Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 66acb37

Browse filesBrowse files
[ErrorHandler] Skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested
1 parent 30dd608 commit 66acb37
Copy full SHA for 66acb37

File tree

1 file changed

+9
-0
lines changed
Filter options

1 file changed

+9
-0
lines changed

‎src/Symfony/Component/ErrorHandler/DebugClassLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/DebugClassLoader.php
+9Lines 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;
@@ -492,6 +493,14 @@ public function checkAnnotations(\ReflectionClass $refl, string $class): array
492493
self::$method[$class] = self::$method[$use];
493494
}
494495
} elseif (!$refl->isInterface()) {
496+
if (!strncmp($vendor, str_replace('_', '\\', $use), $vendorLen)
497+
&& 0 === strpos($className, 'Symfony\\')
498+
&& class_exists(InstalledVersions::class)
499+
&& 'symfony/symfony' !== InstalledVersions::getRootPackage()['name']
500+
) {
501+
// skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested
502+
continue;
503+
}
495504
$hasCall = $refl->hasMethod('__call');
496505
$hasStaticCall = $refl->hasMethod('__callStatic');
497506
foreach (self::$method[$use] as $method) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.