1
0
Fork 0

fix: RootPackageLoader.php constructor creates unusable fallback instance of VersionGuesser (#12305)

pull/12319/head
Peter Philipp 2025-02-18 14:25:25 +01:00 committed by GitHub
parent e58aad45b5
commit a73b127dda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,12 @@ class RootPackageLoader extends ArrayLoader
$this->manager = $manager;
$this->config = $config;
$this->versionGuesser = $versionGuesser ?: new VersionGuesser($config, new ProcessExecutor($io), $this->versionParser, $io);
if (null === $versionGuesser) {
$processExecutor = new ProcessExecutor($io);
$processExecutor->enableAsync();
$versionGuesser = new VersionGuesser($config, $processExecutor, $this->versionParser);
}
$this->versionGuesser = $versionGuesser;
$this->io = $io;
}