8000 bug #59364 [ErrorHandler] Don't trigger "internal" deprecations for a… · symfony/symfony@e8cf9ce · GitHub
[go: up one dir, main page]

Skip to content

Commit e8cf9ce

Browse files
bug #59364 [ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- [ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- dcb856c [ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances
2 parents 6ba6441 + dcb856c commit e8cf9ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/ErrorHandler/DebugClassLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use PHPUnit\Framework\MockObject\MockObject;
2121
use Prophecy\Prophecy\ProphecySubjectInterface;
2222
use ProxyManager\Proxy\ProxyInterface;
23+
use Symfony\Component\DependencyInjection\Argument\LazyClosure;
2324
use Symfony\Component\ErrorHandler\Internal\TentativeTypes;
2425
use Symfony\Component\VarExporter\LazyObjectInterface;
2526

@@ -259,6 +260,7 @@ public static function checkClasses(): bool
259260
&& !is_subclass_of($symbols[$i], LegacyProxy::class)
260261
&& !is_subclass_of($symbols[$i], MockInterface::class)
261262
&& !is_subclass_of($symbols[$i], IMock::class)
263+
&& !(is_subclass_of($symbols[$i], LazyClosure::class) && str_contains($symbols[$i], "@anonymous\0"))
262264
) {
263265
$loader->checkClass($symbols[$i]);
264266
}

0 commit comments

Comments
 (0)
0