1
0
Fork 0

Use pool to match packages to avoid getting packages without ids, fixes #9094

pull/9122/head
Jordi Boggiano 2020-08-12 12:41:19 +02:00
parent 826db3db5e
commit ff757e649c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -578,8 +578,8 @@ EOT
$matchedPackage = null; $matchedPackage = null;
$versions = array(); $versions = array();
$matches = $repositorySet->findPackages($name, $constraint);
$pool = $repositorySet->createPoolForPackage($name); $pool = $repositorySet->createPoolForPackage($name);
$matches = $pool->whatProvides($name, $constraint);
foreach ($matches as $index => $package) { foreach ($matches as $index => $package) {
// select an exact match if it is in the installed repo and no specific version was required // select an exact match if it is in the installed repo and no specific version was required
if (null === $version && $installedRepo->hasPackage($package)) { if (null === $version && $installedRepo->hasPackage($package)) {