minor #38103 Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3) (derrabus)

This PR was merged into the 3.4 branch.

Discussion
----------

Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes/no
| New feature?  | no
| Deprecations? | no
| Tickets       | #37564
| License       | MIT
| Doc PR        | N/A

Our test suite on the 3.4 branch should be compatible with more recent versions of PHPUnit now. In order to make sure that it stays that way, I'm proposing to bump PHPUnit to 8.5 for the php 7.2 job and 9.3 for the php 7.3 and 7.4 jobs.

Commits
-------

ff47516ea0 Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
This commit is contained in:
Fabien Potencier 2020-09-14 09:43:32 +02:00
commit ed3ab52fb7
4 changed files with 7 additions and 7 deletions

View File

@ -12,10 +12,10 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
if (false === getenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT') && false !== strpos(@file_get_contents(__DIR__.'/src/Symfony/Component/HttpKernel/Kernel.php'), 'const MAJOR_VERSION = 3;')) {
putenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1');
}
if (\PHP_VERSION_ID >= 80000) {
putenv('SYMFONY_PHPUNIT_VERSION=9.3');
if (\PHP_VERSION_ID < 70300) {
putenv('SYMFONY_PHPUNIT_VERSION=8.5');
} else {
putenv('SYMFONY_PHPUNIT_VERSION=8.3');
putenv('SYMFONY_PHPUNIT_VERSION=9.3');
}
} elseif (\PHP_VERSION_ID >= 70000) {
putenv('SYMFONY_PHPUNIT_VERSION=6.5');

View File

@ -49,8 +49,8 @@ class SymfonyTestsListenerTrait
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
eval(" // PHP 5.3 compat
(new BlackList())->getBlacklistedDirectories();
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
(new \PHPUnit\Util\Blacklist())->getBlacklistedDirectories();
\PHPUnit\Util\Blacklist::addDirectory(\dirname(__FILE__, 2));
");
} else {
Blacklist::$blacklistedClassNames[__CLASS__] = 2;

View File

@ -25,7 +25,7 @@
"symfony/debug": "~2.8|~3.0|~4.0",
"symfony/event-dispatcher": "~3.4|~4.0",
"symfony/http-foundation": "^3.4.38|^4.3",
"symfony/http-kernel": "^3.4.31|^4.3.4",
"symfony/http-kernel": "^3.4.44|^4.3.4",
"symfony/polyfill-mbstring": "~1.0",
"symfony/filesystem": "~2.8|~3.0|~4.0",
"symfony/finder": "~2.8|~3.0|~4.0",

View File

@ -26,7 +26,7 @@
},
"require-dev": {
"doctrine/collections": "~1.0",
"symfony/validator": "^3.4.3|^4.0.3",
"symfony/validator": "^3.4.44|^4.0.3",
"symfony/dependency-injection": "~3.3|~4.0",
"symfony/config": "~2.7|~3.0|~4.0",
"symfony/expression-language": "~3.4|~4.0",