Skip to content

Commit 9339543

Browse files
Merge branch '5.0'
* 5.0: updated VERSION for 3.4.40 update CONTRIBUTORS for 3.4.40 updated CHANGELOG for 3.4.40 [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) add tests for the ConstraintViolationBuilder class Improve dirname usage [PhpUnitBridge] Use COMPOSER_BINARY env var if available Allow invalidateTags calls to be traced by data collector [YAML] escape DEL(\x7f) fix compatibility with phpunit 9 [Cache] skip APCu in chains when the backend is disabled [Mailer] Add a comment to avoid more wrong PRs on this piece of code [Form] apply automatically step=1 for datetime-local input remove getContainer overwrites in tests Fixing a bug where class_alias would cause incorrect items in debug:autowiring [DependencyInjection][ServiceSubscriber] Support late aliases Fix profiler nullable string type
2 parents f1802ef + 00b8da1 commit 9339543

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ class SymfonyTestsListenerTrait
5050
*/
5151
public function __construct(array $mockedNamespaces = [])
5252
{
53-
Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
53+
if (method_exists(Blacklist::class, 'addDirectory')) {
54+
(new BlackList())->getBlacklistedDirectories();
55+
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
56+
} else {
57+
Blacklist::$blacklistedClassNames[__CLASS__] = 2;
58+
}
5459

5560
$enableDebugClassLoader = class_exists(DebugClassLoader::class) || class_exists(LegacyDebugClassLoader::class);
5661

bin/simple-phpunit.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,10 @@
215215
if (!class_exists('SymfonyBlacklistPhpunit', false)) {
216216
class SymfonyBlacklistPhpunit {}
217217
}
218-
if (class_exists('PHPUnit_Util_Blacklist')) {
219-
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
220-
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
218+
if (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
219+
(new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
220+
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
221+
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
221222
} else {
222223
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
223224
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
2525
},
2626
"conflict": {
27-
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0"
27+
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0|9.1.2"
2828
},
2929
"autoload": {
3030
"files": [ "bootstrap.php" ],

0 commit comments

Comments
 (0)