Skip to content

Commit

Permalink
fix compatibility with phpunit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Apr 23, 2020
1 parent 08ded7f commit 971e800
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
Expand Up @@ -47,8 +47,14 @@ public function __construct(array $mockedNamespaces = array())
{
if (class_exists('PHPUnit_Util_Blacklist')) {
\PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
} else {
Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
} elseif (method_exists(Blacklist::class, 'addDirectory')) {
Blacklist::addDirectory('\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait');
} elseif (class_exists(Blacklist::class)) {
if (method_exists(Blacklist::class, 'addDirectory')) {
Blacklist::addDirectory($className);
} else {
Blacklist::$blacklistedClassNames[$className] = 2;
}
}

$warn = false;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PhpUnit/composer.json
Expand Up @@ -24,7 +24,7 @@
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0"
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0|9.1.2"
},
"autoload": {
"files": [ "bootstrap.php" ],
Expand Down

0 comments on commit 971e800

Please sign in to comment.