From da0386913ea27365c2a5f959c4ea24452bd8ee33 Mon Sep 17 00:00:00 2001 From: Lars Lauger Date: Mon, 1 Feb 2021 20:20:01 +0100 Subject: [PATCH 1/6] FEATURE: Allow neos/flow ^7.0 --- .github/workflows/functionaltests.yml | 2 +- .github/workflows/unittests.yml | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/functionaltests.yml b/.github/workflows/functionaltests.yml index 45d9527..6d0d3fa 100644 --- a/.github/workflows/functionaltests.yml +++ b/.github/workflows/functionaltests.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: php-versions: [7.2, 7.3, 7.4] - flow-versions: [6.3] + flow-versions: [6.3, 7.0] env: APP_ENV: true diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 8607b9d..8172da6 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: php-versions: [7.2, 7.3, 7.4] - flow-versions: [6.3] + flow-versions: [6.3, 7.0] env: APP_ENV: true diff --git a/composer.json b/composer.json index 6472cae..541d0a9 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "require": { "php": "^7.2", - "neos/flow": "^6.3", + "neos/flow": "^6.3 || ^7.0", "sentry/sdk": "^3.1" }, "autoload": { From 950ff7bc9fef8e88c35ae67d90f023c8020be7b1 Mon Sep 17 00:00:00 2001 From: Lars Lauger Date: Mon, 1 Feb 2021 20:29:15 +0100 Subject: [PATCH 2/6] BUGFIX: Disable github workflows for PHP 7.2 + Flow 7.0 Flow 7.0 requires at least PHP 7.3 --- .github/workflows/functionaltests.yml | 4 ++++ .github/workflows/unittests.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/functionaltests.yml b/.github/workflows/functionaltests.yml index 6d0d3fa..6ddb761 100644 --- a/.github/workflows/functionaltests.yml +++ b/.github/workflows/functionaltests.yml @@ -12,6 +12,10 @@ jobs: matrix: php-versions: [7.2, 7.3, 7.4] flow-versions: [6.3, 7.0] + exclude: + # Disable Flow 7.0 on PHP 7.2, as 7.3 is required + - php-versions: 7.2 + flow-versions: 7.0 env: APP_ENV: true diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 8172da6..390b748 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -12,6 +12,10 @@ jobs: matrix: php-versions: [7.2, 7.3, 7.4] flow-versions: [6.3, 7.0] + exclude: + # Disable Flow 7.0 on PHP 7.2, as 7.3 is required + - php-versions: 7.2 + flow-versions: 7.0 env: APP_ENV: true From 4d7d3d18d3efcdb0f14fd621b3560c2eb8914998 Mon Sep 17 00:00:00 2001 From: Lars Lauger Date: Mon, 1 Feb 2021 20:32:12 +0100 Subject: [PATCH 3/6] BUGFIX: Reformat github workflow files --- .github/workflows/functionaltests.yml | 100 +++++++++++++------------- .github/workflows/unittests.yml | 100 +++++++++++++------------- 2 files changed, 100 insertions(+), 100 deletions(-) diff --git a/.github/workflows/functionaltests.yml b/.github/workflows/functionaltests.yml index 6ddb761..2888bb3 100644 --- a/.github/workflows/functionaltests.yml +++ b/.github/workflows/functionaltests.yml @@ -1,54 +1,54 @@ name: functionaltests -on: [push, pull_request] +on: [ push, pull_request ] jobs: - unittests: - name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Functional Tests' - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php-versions: [7.2, 7.3, 7.4] - flow-versions: [6.3, 7.0] - exclude: - # Disable Flow 7.0 on PHP 7.2, as 7.3 is required - - php-versions: 7.2 - flow-versions: 7.0 - - env: - APP_ENV: true - FLOW_CONTEXT: Testing/Functional - FLOW_DIST_FOLDER: flow-base-distribution - - steps: - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite - ini-values: opcache.fast_shutdown=0 - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache - key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }} - restore-keys: | - php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer- - php-${{ matrix.php-versions }}-flow- - - name: Install composer dependencies - run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}" - - - name: Checkout code - uses: actions/checkout@v2 - with: - path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry - - - name: Install netlogix/sentry - run: composer require netlogix/sentry:@dev - working-directory: ${{ env.FLOW_DIST_FOLDER }} - - - name: Run tests - run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php" - working-directory: ${{ env.FLOW_DIST_FOLDER }} + unittests: + name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Functional Tests' + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php-versions: [ 7.2, 7.3, 7.4 ] + flow-versions: [ 6.3, 7.0 ] + exclude: + # Disable Flow 7.0 on PHP 7.2, as 7.3 is required + - php-versions: 7.2 + flow-versions: 7.0 + + env: + APP_ENV: true + FLOW_CONTEXT: Testing/Functional + FLOW_DIST_FOLDER: flow-base-distribution + + steps: + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite + ini-values: opcache.fast_shutdown=0 + + - name: Cache composer dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache + key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }} + restore-keys: | + php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer- + php-${{ matrix.php-versions }}-flow- + - name: Install composer dependencies + run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}" + + - name: Checkout code + uses: actions/checkout@v2 + with: + path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry + + - name: Install netlogix/sentry + run: composer require netlogix/sentry:@dev + working-directory: ${{ env.FLOW_DIST_FOLDER }} + + - name: Run tests + run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php" + working-directory: ${{ env.FLOW_DIST_FOLDER }} diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 390b748..b1de602 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -1,54 +1,54 @@ name: unittests -on: [push, pull_request] +on: [ push, pull_request ] jobs: - unittests: - name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Unit Tests' - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php-versions: [7.2, 7.3, 7.4] - flow-versions: [6.3, 7.0] - exclude: - # Disable Flow 7.0 on PHP 7.2, as 7.3 is required - - php-versions: 7.2 - flow-versions: 7.0 - - env: - APP_ENV: true - FLOW_CONTEXT: Testing/Unit - FLOW_DIST_FOLDER: flow-base-distribution - - steps: - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite - ini-values: opcache.fast_shutdown=0 - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache - key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }} - restore-keys: | - php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer- - php-${{ matrix.php-versions }}-flow- - - name: Install composer dependencies - run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}" - - - name: Checkout code - uses: actions/checkout@v2 - with: - path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry - - - name: Install netlogix/sentry - run: composer require netlogix/sentry:@dev - working-directory: ${{ env.FLOW_DIST_FOLDER }} - - - name: Run tests - run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Unit" --bootstrap "Build/BuildEssentials/PhpUnit/UnitTestBootstrap.php" - working-directory: ${{ env.FLOW_DIST_FOLDER }} + unittests: + name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Unit Tests' + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php-versions: [ 7.2, 7.3, 7.4 ] + flow-versions: [ 6.3, 7.0 ] + exclude: + # Disable Flow 7.0 on PHP 7.2, as 7.3 is required + - php-versions: 7.2 + flow-versions: 7.0 + + env: + APP_ENV: true + FLOW_CONTEXT: Testing/Unit + FLOW_DIST_FOLDER: flow-base-distribution + + steps: + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite + ini-values: opcache.fast_shutdown=0 + + - name: Cache composer dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache + key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }} + restore-keys: | + php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer- + php-${{ matrix.php-versions }}-flow- + - name: Install composer dependencies + run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}" + + - name: Checkout code + uses: actions/checkout@v2 + with: + path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry + + - name: Install netlogix/sentry + run: composer require netlogix/sentry:@dev + working-directory: ${{ env.FLOW_DIST_FOLDER }} + + - name: Run tests + run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Unit" --bootstrap "Build/BuildEssentials/PhpUnit/UnitTestBootstrap.php" + working-directory: ${{ env.FLOW_DIST_FOLDER }} From 44476cc999c915bd8b8fd05930ab9f06340d7197 Mon Sep 17 00:00:00 2001 From: Lars Lauger Date: Mon, 1 Feb 2021 20:34:05 +0100 Subject: [PATCH 4/6] BUGFIX: Use singular for github workflow matrix --- .github/workflows/functionaltests.yml | 20 ++++++++++---------- .github/workflows/unittests.yml | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/functionaltests.yml b/.github/workflows/functionaltests.yml index 2888bb3..bb09d97 100644 --- a/.github/workflows/functionaltests.yml +++ b/.github/workflows/functionaltests.yml @@ -4,18 +4,18 @@ on: [ push, pull_request ] jobs: unittests: - name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Functional Tests' + name: '[PHP ${{ matrix.php-version }} | Flow ${{ matrix.flow-version }}] Functional Tests' runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php-versions: [ 7.2, 7.3, 7.4 ] - flow-versions: [ 6.3, 7.0 ] + php-version: [ 7.2, 7.3, 7.4 ] + flow-version: [ 6.3, 7.0 ] exclude: # Disable Flow 7.0 on PHP 7.2, as 7.3 is required - - php-versions: 7.2 - flow-versions: 7.0 + - php-version: 7.2 + flow-version: 7.0 env: APP_ENV: true @@ -25,7 +25,7 @@ jobs: steps: - uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite ini-values: opcache.fast_shutdown=0 @@ -33,12 +33,12 @@ jobs: uses: actions/cache@v1 with: path: ~/.composer/cache - key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }} + key: php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }} restore-keys: | - php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer- - php-${{ matrix.php-versions }}-flow- + php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer- + php-${{ matrix.php-version }}-flow- - name: Install composer dependencies - run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}" + run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-version }}" - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index b1de602..77a6bff 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -4,18 +4,18 @@ on: [ push, pull_request ] jobs: unittests: - name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Unit Tests' + name: '[PHP ${{ matrix.php-version }} | Flow ${{ matrix.flow-version }}] Unit Tests' runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php-versions: [ 7.2, 7.3, 7.4 ] - flow-versions: [ 6.3, 7.0 ] + php-version: [ 7.2, 7.3, 7.4 ] + flow-version: [ 6.3, 7.0 ] exclude: # Disable Flow 7.0 on PHP 7.2, as 7.3 is required - - php-versions: 7.2 - flow-versions: 7.0 + - php-version: 7.2 + flow-version: 7.0 env: APP_ENV: true @@ -25,7 +25,7 @@ jobs: steps: - uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite ini-values: opcache.fast_shutdown=0 @@ -33,12 +33,12 @@ jobs: uses: actions/cache@v1 with: path: ~/.composer/cache - key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }} + key: php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }} restore-keys: | - php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer- - php-${{ matrix.php-versions }}-flow- + php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer- + php-${{ matrix.php-version }}-flow- - name: Install composer dependencies - run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}" + run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-version }}" - name: Checkout code uses: actions/checkout@v2 From 45b30fc0249e1a5e2bd1dc68d4e716d268034fae Mon Sep 17 00:00:00 2001 From: Lars Lauger Date: Mon, 1 Feb 2021 20:49:30 +0100 Subject: [PATCH 5/6] BUGFIX: Use is_a to assert class-string is of proper type --- Classes/ThrowableStorage/CompoundStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/ThrowableStorage/CompoundStorage.php b/Classes/ThrowableStorage/CompoundStorage.php index da7543f..763cfa4 100644 --- a/Classes/ThrowableStorage/CompoundStorage.php +++ b/Classes/ThrowableStorage/CompoundStorage.php @@ -106,7 +106,7 @@ public function setBacktraceRenderer(\Closure $backtraceRenderer) private function createStorage(string $storageClassName): ThrowableStorageInterface { - assert($storageClassName instanceof ThrowableStorageInterface); + assert(is_a($storageClassName, ThrowableStorageInterface::class, true)); $bootstrap = Bootstrap::$staticObjectManager->get(Bootstrap::class); $configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class); $settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow'); From dbb23ee48aa88554e0025a06f689a8b7b5f01b71 Mon Sep 17 00:00:00 2001 From: Lars Lauger Date: Mon, 1 Feb 2021 20:51:50 +0100 Subject: [PATCH 6/6] FEATURE: Document Flow 7.0 support in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aa7e109..f589f68 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ configure and extend this package to fit your needs. Currently the following Flow versions are supported: * `^6.3` +* `^7.0` ## Setup