From beb23cbf11e208a9567238ce9cea23f15ceeda3f Mon Sep 17 00:00:00 2001 From: Peter Philipp Date: Sat, 8 Feb 2025 18:47:25 +0100 Subject: [PATCH] fix: RootPackageLoader.php constructor creates unusable fallback instance of VersionGuesser --- src/Composer/Package/Loader/RootPackageLoader.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Composer/Package/Loader/RootPackageLoader.php b/src/Composer/Package/Loader/RootPackageLoader.php index 50807e506..4d17e6e8a 100644 --- a/src/Composer/Package/Loader/RootPackageLoader.php +++ b/src/Composer/Package/Loader/RootPackageLoader.php @@ -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 (!$versionGuesser) { + $processExecutor = new ProcessExecutor($io); + $processExecutor->enableAsync(); + $versionGuesser = new VersionGuesser($config, $processExecutor, $this->versionParser); + } + $this->versionGuesser = $versionGuesser; $this->io = $io; }