File tree 1 file changed +4
-3
lines changed
src/Symfony/Bridge/PhpUnit/Legacy
1 file changed +4
-3
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 as DebugDebugClassLoader ;
21
22
use Symfony \Component \ErrorHandler \DebugClassLoader ;
22
23
23
24
/**
@@ -53,8 +54,6 @@ 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\ErrorHandler\DebugClassLoader ' );
57
-
58
57
foreach ($ mockedNamespaces as $ type => $ namespaces ) {
59
58
if (!\is_array ($ namespaces )) {
60
59
$ namespaces = array ($ namespaces );
@@ -73,8 +72,10 @@ public function __construct(array $mockedNamespaces = array())
73
72
$ enableDebugClassLoader = $ namespaces && $ namespaces [0 ];
74
73
}
75
74
}
76
- if ($ enableDebugClassLoader ) {
75
+ if (class_exists ( ' Symfony\Component\ErrorHandler\DebugClassLoader ' ) ) {
77
76
DebugClassLoader::enable ();
77
+ } elseif (class_exists ('Symfony\Component\Debug\DebugClassLoader ' )) {
78
+ DebugDebugClassLoader::enable ();
78
79
}
79
80
if (self ::$ globallyEnabled ) {
80
81
$ this ->state = -2 ;
You can’t perform that action at this time.
0 commit comments