Skip to content

Commit

Permalink
bug #50204 [ErrorHandler] Skip Httplug deprecations for HttplugClient…
Browse files Browse the repository at this point in the history
… (nicolas-grekas)

This PR was merged into the 5.4 branch.

Discussion
----------

[ErrorHandler] Skip Httplug deprecations for HttplugClient

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Follows #50036 and php-http/httplug#171

Commits
-------

159bf0b [ErrorHandler] Skip Httplug deprecations for HttplugClient
  • Loading branch information
nicolas-grekas committed May 2, 2023
2 parents c6a452d + 159bf0b commit c78f20e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/ErrorHandler/DebugClassLoader.php
Expand Up @@ -416,7 +416,7 @@ public function checkAnnotations(\ReflectionClass $refl, string $class): array
$this->checkClass($use);
}
if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class])
&& !(HttplugClient::class === $class && \in_array($use, [\Http\Message\RequestFactory::class, \Http\Message\StreamFactory::class, \Http\Message\UriFactory::class], true))
&& !(HttplugClient::class === $class && \in_array($use, [\Http\Client\HttpClient::class, \Http\Message\RequestFactory::class, \Http\Message\StreamFactory::class, \Http\Message\UriFactory::class], true))
) {
$type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait');
$verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses');
Expand Down

0 comments on commit c78f20e

Please sign in to comment.