diff --git a/.github/workflows/functionaltests.yml b/.github/workflows/functionaltests.yml index 45d9527..bb09d97 100644 --- a/.github/workflows/functionaltests.yml +++ b/.github/workflows/functionaltests.yml @@ -1,50 +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] - - 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-version }} | Flow ${{ matrix.flow-version }}] Functional Tests' + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + 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-version: 7.2 + flow-version: 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-version }} + 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-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }} + restore-keys: | + 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-version }}" + + - 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 8607b9d..77a6bff 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -1,50 +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] - - 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-version }} | Flow ${{ matrix.flow-version }}] Unit Tests' + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + 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-version: 7.2 + flow-version: 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-version }} + 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-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }} + restore-keys: | + 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-version }}" + + - 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 }} 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'); 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 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": {