8000 [ErrorHandler] Skip "same vendor" `@method` deprecations for `Symfony\*` classes unless symfony/symfony is being tested by nicolas-grekas · Pull Request #41075 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[ErrorHandler] Skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested #41075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[ErrorHandler] Skip "same vendor" @method deprecations for `Symfony…
…\*` classes unless symfony/symfony is being tested
  • Loading branch information
nicolas-grekas committed May 2, 2021
commit 7a1a91017df6a852e9089b0bf095707e30b10f0d
9 changes: 9 additions & 0 deletions src/Symfony/Component/ErrorHandler/DebugClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\ErrorHandler;

use Composer\InstalledVersions;
use Doctrine\Common\Persistence\Proxy as LegacyProxy;
use Doctrine\Persistence\Proxy;
use Mockery\MockInterface;
Expand Down Expand Up @@ -492,6 +493,14 @@ public function checkAnnotations(\ReflectionClass $refl, string $class): array
self::$method[$class] = self::$method[$use];
}
} elseif (!$refl->isInterface()) {
if (!strncmp($vendor, str_replace('_', '\\', $use), $vendorLen)
&& 0 === strpos($className, 'Symfony\\')
&& (!class_exists(InstalledVersions::class)
|| 'symfony/symfony' !== InstalledVersions::getRootPackage()['name'])
) {
// skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested
continue;
}
$hasCall = $refl->hasMethod('__call');
$hasStaticCall = $refl->hasMethod('__callStatic');
foreach (self::$method[$use] as $method) {
Expand Down
0