File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 18
18
use PHPUnit \Util \Blacklist ;
19
19
use Symfony \Bridge \PhpUnit \ClockMock ;
20
20
use Symfony \Bridge \PhpUnit \DnsMock ;
21
- use Symfony \Component \Debug \DebugClassLoader ;
21
+ use Symfony \Component \Debug \DebugClassLoader as LegacyDebugClassLoader ;
22
+ use Symfony \Component \ErrorHandler \DebugClassLoader ;
22
23
23
24
/**
24
25
* PHP 5.3 compatible trait-like shared implementation.
@@ -53,7 +54,7 @@ public function __construct(array $mockedNamespaces = array())
53
54
Blacklist::$ blacklistedClassNames ['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait ' ] = 2 ;
54
55
}
55
56
56
- $ enableDebugClassLoader = class_exists (' Symfony\Component\Debug\ DebugClassLoader' );
57
+ $ enableDebugClassLoader = class_exists (DebugClassLoader::class) || class_exists (LegacyDebugClassLoader::class );
57
58
58
59
foreach ($ mockedNamespaces as $ type => $ namespaces ) {
59
60
if (!\is_array ($ namespaces )) {
@@ -74,7 +75,11 @@ public function __construct(array $mockedNamespaces = array())
74
75
}
75
76
}
76
77
if ($ enableDebugClassLoader ) {
77
- DebugClassLoader::enable ();
78
+ if (class_exists (DebugClassLoader::class)) {
79
+ DebugClassLoader::enable ();
80
+ } else {
81
+ LegacyDebugClassLoader::enable ();
82
+ }
78
83
}
79
84
if (self ::$ globallyEnabled ) {
80
85
$ this ->state = -2 ;
Original file line number Diff line number Diff line change 21
21
"php" : " >=5.5.9"
22
22
},
23
23
"suggest" : {
24
- "symfony/debug " : " For tracking deprecated interfaces usages at runtime with DebugClassLoader"
24
+ "symfony/error-handler " : " For tracking deprecated interfaces usages at runtime with DebugClassLoader"
25
25
},
26
26
"conflict" : {
27
27
"phpunit/phpunit" : " <4.8.35|<5.4.3,>=5.0"
You can’t perform that action at this time.
0 commit comments