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 3d94a91

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

File tree

1 file changed

+6
-5
lines changed
Filter options

1 file changed

+6
-5
lines changed

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

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

2324
/**
2425
* PHP 5.3 compatible trait-like shared implementation.
@@ -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) {
77-
DebugClassLoader::enable();
75+
if (class_exists('Symfony\Component\ErrorHandler\DebugClassLoader')) {
76+
ErrorHandlerDebugClassLoader::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.