Skip to content

Commit c00a3d9

Browse files
Merge branch '4.4' into 5.2
* 4.4: Fix CS Avoid triggering the autoloader in Deprecation::isLegacy()
2 parents 7a8e561 + 95a1dca commit c00a3d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

DeprecationErrorHandler/Deprecation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
use PHPUnit\Framework\TestCase;
1515
use PHPUnit\Framework\TestSuite;
1616
use PHPUnit\Metadata\Api\Groups;
17-
use PHPUnit\Util\Error\Handler;
1817
use PHPUnit\Util\Test;
1918
use Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerFor;
2019
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
2120
use Symfony\Component\ErrorHandler\DebugClassLoader;
2221

22+
class_exists(Groups::class);
23+
2324
/**
2425
* @internal
2526
*/
@@ -203,7 +204,7 @@ public function isLegacy()
203204
}
204205

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

208209
return 0 === strpos($method, 'testLegacy')
209210
|| 0 === strpos($method, 'provideLegacy')

0 commit comments

Comments
 (0)