diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf28ca03774..15e7f0fc6a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -998,6 +998,8 @@ jobs: name: PHPUnit (PHP ${{ matrix.php }}) (Symfony lowest) runs-on: ubuntu-latest timeout-minutes: 20 + env: + SYMFONY_PHPUNIT_VERSION: '9.5' strategy: matrix: php: @@ -1027,10 +1029,12 @@ jobs: run: rm -Rf tests/Fixtures/app/var/cache/* - name: Update project dependencies run: composer update --prefer-lowest --no-interaction --no-progress --ansi + - name: Install PHPUnit + run: vendor/bin/simple-phpunit --version - name: Clear test app cache run: tests/Fixtures/app/console cache:clear --ansi - name: Run PHPUnit tests - run: vendor/bin/phpunit + run: vendor/bin/simple-phpunit env: SYMFONY_DEPRECATIONS_HELPER: max[self]=0&ignoreFile=./tests/.ignored-deprecations diff --git a/.github/workflows/guides.yaml b/.github/workflows/guides.yaml index 1b2b483b915..b4613285c47 100644 --- a/.github/workflows/guides.yaml +++ b/.github/workflows/guides.yaml @@ -53,7 +53,11 @@ jobs: KERNEL_CLASS: \ApiPlatform\Playground\Kernel run: | for d in guides/*.php; do - rm -f var/data.db - echo "Testing guide $d" - pdg-phpunit $d || exit 1 + rm -f var/*.db + echo "Testing guide $d" + pdg-phpunit $d || exit 1 + exit_status=$? + if [ $exit_status -ne 0 ]; then + exit $exit_status + fi done diff --git a/composer.json b/composer.json index 5f1c863939c..22978bd7cd3 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,6 @@ "willdurand/negotiation": "^3.0" }, "require-dev": { - "soyuka/pmu": "^0.0.2", "behat/behat": "^3.11", "behat/mink": "^1.9", "doctrine/cache": "^1.11 || ^2.1", @@ -68,6 +67,7 @@ "ramsey/uuid-doctrine": "^1.4 || ^2.0", "sebastian/comparator": "<5.0", "soyuka/contexts": "v3.3.9", + "soyuka/pmu": "^0.0.2", "soyuka/stubs-mongodb": "^1.0", "symfony/asset": "^6.4 || ^7.0", "symfony/browser-kit": "^6.4 || ^7.0", diff --git a/docs/src/DependencyInjection/Compiler/AttributeFilterPass.php b/docs/src/DependencyInjection/Compiler/AttributeFilterPass.php index a38b1efcd55..6e1c79167f5 100644 --- a/docs/src/DependencyInjection/Compiler/AttributeFilterPass.php +++ b/docs/src/DependencyInjection/Compiler/AttributeFilterPass.php @@ -35,7 +35,10 @@ final class AttributeFilterPass implements CompilerPassInterface public function process(ContainerBuilder $container): void { foreach (get_declared_classes() as $class) { - $this->createFilterDefinitions(new \ReflectionClass($class), $container); + $r = new \ReflectionClass($class); + if (str_contains((string) $r->getFileName(), 'guides')) { + $this->createFilterDefinitions($r, $container); + } } }