Skip to content

Commit 7a1d6b2

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [Security] Add missing German translations [ErrorHandler] Skip "same vendor" `@method` deprecations for `Symfony\*` classes unless symfony/symfony is being tested [Security] Add missing Dutch translations
2 parents 841308e + 930c76d commit 7a1d6b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

DebugClassLoader.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\ErrorHandler;
1313

14+
use Composer\InstalledVersions;
1415
use Doctrine\Common\Persistence\Proxy as LegacyProxy;
1516
use Doctrine\Persistence\Proxy;
1617
use Mockery\MockInterface;
@@ -491,6 +492,14 @@ public function checkAnnotations(\ReflectionClass $refl, string $class): array
491492
self::$method[$class] = self::$method[$use];
492493
}
493494
} elseif (!$refl->isInterface()) {
495+
if (!strncmp($vendor, str_replace('_', '\\', $use), $vendorLen)
496+
&& 0 === strpos($className, 'Symfony\\')
497+
&& (!class_exists(InstalledVersions::class)
498+
|| 'symfony/symfony' !== InstalledVersions::getRootPackage()['name'])
499+
) {
500+
// skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested
501+
continue;
502+
}
494503
$hasCall = $refl->hasMethod('__call');
495504
$hasStaticCall = $refl->hasMethod('__callStatic');
496505
foreach (self::$method[$use] as $method) {

0 commit comments

Comments
 (0)