Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bafb237

Browse files
[ErrorHandler] Don't throw deprecations for HttplugClient
1 parent 49de027 commit bafb237

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/ErrorHandler/DebugClassLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Prophecy\Prophecy\ProphecySubjectInterface;
2222
use ProxyManager\Proxy\ProxyInterface;
2323
use Symfony\Component\ErrorHandler\Internal\TentativeTypes;
24+
use Symfony\Component\HttpClient\HttplugClient;
2425

2526
/**
2627
* Autoloader checking if the class is really defined in the file found.
@@ -414,7 +415,9 @@ public function checkAnnotations(\ReflectionClass $refl, string $class): array
414415
if (!isset(self::$checkedClasses[$use])) {
415416
$this->checkClass($use);
416417
}
417-
if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class])) {
418+
if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class])
419+
&& !(HttplugClient::class === $class && \in_array($use, [\Http\Message\RequestFactory::class, \Http\Message\StreamFactory::class, \Http\Message\UriFactory::class], true))
420+
) {
418421
$type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait');
419422
$verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses');
420423

0 commit comments

Comments
 (0)