From 5134de52f14b56026e2e91cda19d5d7995d4188f Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Sat, 5 Dec 2020 15:24:50 +0100 Subject: [PATCH] Added compatibility with PHPunit 9.5 --- phpunit | 2 +- src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php | 2 +- src/Symfony/Component/Security/phpunit.xml.dist | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/phpunit b/phpunit index 03bf63b0aa..9141d249d2 100755 --- a/phpunit +++ b/phpunit @@ -13,7 +13,7 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) { } elseif (\PHP_VERSION_ID < 70300) { putenv('SYMFONY_PHPUNIT_VERSION=8.5'); } else { - putenv('SYMFONY_PHPUNIT_VERSION=9.4'); + putenv('SYMFONY_PHPUNIT_VERSION=9.5'); } } if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) { diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php index c1b276cea2..4ca396ece1 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php @@ -42,7 +42,7 @@ class CoverageListenerTrait return; } - $annotations = $test->getAnnotations(); + $annotations = Test::parseTestMethodAnnotations(\get_class($test), $test->getName(false)); $ignoredAnnotations = ['covers', 'coversDefaultClass', 'coversNothing']; diff --git a/src/Symfony/Component/Security/phpunit.xml.dist b/src/Symfony/Component/Security/phpunit.xml.dist index c6d083afee..ec8c89709e 100644 --- a/src/Symfony/Component/Security/phpunit.xml.dist +++ b/src/Symfony/Component/Security/phpunit.xml.dist @@ -14,7 +14,6 @@ - ./Tests/ ./*/Tests/ @@ -23,8 +22,6 @@ ./ - ./Resources - ./Tests ./vendor ./*/Resources ./*/Tests