work around bug with autoload collistion with custom PHPStan rule test

This commit is contained in:
Tomas Votruba 2022-05-01 20:08:53 +02:00
parent d5c927a40c
commit 1c828eea13
1 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,11 @@ spl_autoload_register(function (string $class): void {
// prefixed version autoload
$composerAutoloader = require __DIR__ . '/vendor/autoload.php';
}
$composerAutoloader->loadClass($class);
// some weird collision with PHPStan custom rule tests
if (! is_int($composerAutoloader)) {
$composerAutoloader->loadClass($class);
}
}
// aliased by php-scoper, that's why its missing