minor #36568 [PhpUnitBridge] Improve dirname usage (Jean85)
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Improve dirname usage
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix #36499
| License | MIT
This is a very small performance improvement on top of #36539
Commits
-------
e721cfd65c
Improve dirname usage
This commit is contained in:
commit
b3cdf5c989
@ -49,7 +49,7 @@ class SymfonyTestsListenerTrait
|
|||||||
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
||||||
} elseif (method_exists(Blacklist::class, 'addDirectory')) {
|
} elseif (method_exists(Blacklist::class, 'addDirectory')) {
|
||||||
(new BlackList())->getBlacklistedDirectories();
|
(new BlackList())->getBlacklistedDirectories();
|
||||||
Blacklist::addDirectory(\dirname(\dirname((new \ReflectionClass(__CLASS__))->getFileName())));
|
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
|
||||||
} else {
|
} else {
|
||||||
Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user