Skip to content

Commit d843587

Browse files
committed
Avoid triggering the autoloader in Deprecation::isLegacy()
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 6974ebb commit d843587

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)