Skip to content

Commit a5d3bc8

Browse files
Merge branch '4.4'
* 4.4: (30 commits) fix merge fix merge [HttpClient] fix debug output added to stderr at shutdown fix cs [Mailer] fixed logic fixed missing license Add a new ErrorHandler component (mirror of the Debug component) Use mocks before replacing the error handler [Config] Do not use absolute path when computing the vendor freshness [Process] Path resolution for FCGI configuration Bump minimum version of symfony/phpunit-bridge Container*::getServiceIds() should return an array of string [Config][ReflectionClassResource] Use ternary instead of null coaelscing operator [Validator] Add missing Russian and Ukrainian translations [Translation] Use HTTPS and fix a url [Config] Fix for signatures of typed properties [Validator] Add missing Hungarian translations [Validator] Add Lithuanian translation for Range validator Add HTTPS to a URL sync translation files ...
2 parents 3e3b3f1 + 3c312e3 commit a5d3bc8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 8 additions & 3 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\Debug\DebugClassLoader;
21+
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
22+
use Symfony\Component\ErrorHandler\DebugClassLoader;
2223

2324
/**
2425
* PHP 5.3 compatible trait-like shared implementation.
@@ -53,7 +54,7 @@ public function __construct(array $mockedNamespaces = array())
5354
Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
5455
}
5556

56-
$enableDebugClassLoader = class_exists('Symfony\Component\Debug\DebugClassLoader');
57+
$enableDebugClassLoader = class_exists(DebugClassLoader::class) || class_exists(LegacyDebugClassLoader::class);
5758

5859
foreach ($mockedNamespaces as $type => $namespaces) {
5960
if (!\is_array($namespaces)) {
@@ -74,7 +75,11 @@ public function __construct(array $mockedNamespaces = array())
7475
}
7576
}
7677
if ($enableDebugClassLoader) {
77-
DebugClassLoader::enable();
78+
if (class_exists(DebugClassLoader::class)) {
79+
DebugClassLoader::enable();
80+
} else {
81+
LegacyDebugClassLoader::enable();
82+
}
7883
}
7984
if (self::$globallyEnabled) {
8085
$this->state = -2;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"php": ">=5.5.9"
2222
},
2323
"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"
2525
},
2626
"conflict": {
2727
"phpunit/phpunit": "<5.4.3"

0 commit comments

Comments
 (0)