Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f29cec4

Browse filesBrowse files
committed
Enabling the DebugClassLoader available
1 parent ca9ad2b commit f29cec4
Copy full SHA for f29cec4

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use PHPUnit\Util\Blacklist;
1919
use Symfony\Bridge\PhpUnit\ClockMock;
2020
use Symfony\Bridge\PhpUnit\DnsMock;
21+
use Symfony\Component\Debug\DebugClassLoader as DebugDebugClassLoader;
2122
use Symfony\Component\ErrorHandler\DebugClassLoader;
2223

2324
/**
@@ -53,8 +54,6 @@ public function __construct(array $mockedNamespaces = array())
5354
Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
5455
}
5556

56-
$enableDebugClassLoader = class_exists('Symfony\Component\ErrorHandler\DebugClassLoader');
57-
5857
foreach ($mockedNamespaces as $type => $namespaces) {
5958
if (!\is_array($namespaces)) {
6059
$namespaces = array($namespaces);
@@ -73,8 +72,10 @@ public function __construct(array $mockedNamespaces = array())
7372
$enableDebugClassLoader = $namespaces && $namespaces[0];
7473
}
7574
}
76-
if ($enableDebugClassLoader) {
75+
if (class_exists('Symfony\Component\ErrorHandler\DebugClassLoader')) {
7776
DebugClassLoader::enable();
77+
} elseif (class_exists('Symfony\Component\Debug\DebugClassLoader')) {
78+
DebugDebugClassLoader::enable();
7879
}
7980
if (self::$globallyEnabled) {
8081
$this->state = -2;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.