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
-------
b95dfede5f
Avoid triggering the autoloader in Deprecation::isLegacy()
This commit is contained in:
commit
3c72d518f5
|
@ -20,6 +20,8 @@ use Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerFor;
|
|||
use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
|
||||
use Symfony\Component\ErrorHandler\DebugClassLoader;
|
||||
|
||||
class_exists(Groups::class);
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -194,7 +196,7 @@ class Deprecation
|
|||
}
|
||||
|
||||
$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')
|
||||
|
|
Reference in New Issue