Skip to content

Commit

Permalink
Avoid triggering the autoloader in Deprecation::isLegacy()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander M. Turek <[email protected]>
  • Loading branch information
derrabus committed Jul 2, 2021
1 parent 6974ebb commit d843587
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DeprecationErrorHandler/Deprecation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
use Symfony\Component\ErrorHandler\DebugClassLoader;

class_exists(Groups::class);

/**
* @internal
*/
Expand Down Expand Up @@ -194,7 +196,7 @@ public function isLegacy()
}

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

return 0 === strpos($method, 'testLegacy')
|| 0 === strpos($method, 'provideLegacy')
Expand Down

0 comments on commit d843587

Please sign in to comment.