From ff757e649cc10bfc19eee0900353035cb42912e5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 12 Aug 2020 12:41:19 +0200 Subject: [PATCH] Use pool to match packages to avoid getting packages without ids, fixes #9094 --- src/Composer/Command/ShowCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 5541b53a8..635d56bf3 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -578,8 +578,8 @@ EOT $matchedPackage = null; $versions = array(); - $matches = $repositorySet->findPackages($name, $constraint); $pool = $repositorySet->createPoolForPackage($name); + $matches = $pool->whatProvides($name, $constraint); foreach ($matches as $index => $package) { // select an exact match if it is in the installed repo and no specific version was required if (null === $version && $installedRepo->hasPackage($package)) {