Skip to content

Commit 774d8f2

Browse files
committed
bug #59888 [PhpUnitBridge] don't trigger "internal" deprecations for PHPUnit Stub objects (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [PhpUnitBridge] don't trigger "internal" deprecations for PHPUnit Stub objects | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #59882 | License | MIT Commits ------- 278c808 don't trigger "internal" deprecations for PHPUnit Stub objects
2 parents 642b714 + 278c808 commit 774d8f2

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
@@ -18,6 +18,7 @@
1818
use Phake\IMock;
1919
use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation;
2020
use PHPUnit\Framework\MockObject\MockObject;
21+
use PHPUnit\Framework\MockObject\Stub;
2122
use Prophecy\Prophecy\ProphecySubjectInterface;
2223
use ProxyManager\Proxy\ProxyInterface;
2324
use Symfony\Component\DependencyInjection\Argument\LazyClosure;
@@ -253,6 +254,7 @@ public static function checkClasses(): bool
253254

254255
for (; $i < \count($symbols); ++$i) {
255256
if (!is_subclass_of($symbols[$i], MockObject::class)
257+
&& !is_subclass_of($symbols[$i], Stub::class)
256258
&& !is_subclass_of($symbols[$i], ProphecySubjectInterface::class)
257259
&& !is_subclass_of($symbols[$i], Proxy::class)
258260
&& !is_subclass_of($symbols[$i], ProxyInterface::class)

0 commit comments

Comments
 (0)