bug #36625 [PhpUnitBridge] fix compat with PHP 5.3 (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] fix compat with PHP 5.3
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | fixes #36638
| License | MIT
| Doc PR | -
Commits
-------
856ba8c98f
[PhpUnitBridge] fix compat with PHP 5.3
This commit is contained in:
commit
f7749c3774
@ -47,7 +47,7 @@ class SymfonyTestsListenerTrait
|
||||
{
|
||||
if (class_exists('PHPUnit_Util_Blacklist')) {
|
||||
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
||||
} elseif (method_exists(Blacklist::class, 'addDirectory')) {
|
||||
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
|
||||
(new BlackList())->getBlacklistedDirectories();
|
||||
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
|
||||
} else {
|
||||
|
@ -130,8 +130,8 @@ if (class_exists('PHPUnit_Util_Blacklist')) {
|
||||
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
||||
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
|
||||
(new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
|
||||
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
|
||||
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
|
||||
PHPUnit\Util\Blacklist::addDirectory(dirname((new ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
|
||||
PHPUnit\Util\Blacklist::addDirectory(dirname((new ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
|
||||
} else {
|
||||
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
||||
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
||||
|
Reference in New Issue
Block a user