8000 minor #41948 [PhpUnitBridge] Avoid triggering the autoloader in Depre… · symfony/symfony@3c72d51 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c72d51

Browse files
minor #41948 [PhpUnitBridge] Avoid triggering the autoloader in Deprecation::isLegacy() (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- [PhpUnitBridge] Avoid triggering the autoloader in Deprecation::isLegacy() | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A The low-deps tests are currently failing because Deprecation::isLegacy() keeps triggering the autoloader and might even do so while `DebugClassLoader` considers a failed autoload attempt as an error. Commits ------- b95dfed Avoid triggering the autoloader in Deprecation::isLegacy()
2 parents cf0f3c9 + b95dfed commit 3c72d51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
2121
use Symfony\Component\ErrorHandler\DebugClassLoader;
2222

23+
class_exists(Groups::class);
24+
2325
/**
2426
* @internal
2527
*/
@@ -194,7 +196,7 @@ public function isLegacy()
194196
}
195197

196198
$method = $this->originatingMethod();
197-
$groups = class_exists(Groups::class) ? [new Groups(), 'groups'] : [Test::class, 'getGroups'];
199+
$groups = class_exists(Groups::class, false) ? [new Groups(), 'groups'] : [Test::class, 'getGroups'];
198200

199201
return 0 === strpos($method, 'testLegacy')
200202
|| 0 === strpos($method, 'provideLegacy')

0 commit comments

Comments
 (0)
0