Skip to content

Commit

Permalink
Make sure we compare packages to their latest without aliases, fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Oct 27, 2020
1 parent 86072a7 commit 90a6aa7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Composer/Command/ShowCommand.php
Expand Up @@ -1227,7 +1227,12 @@ private function findLatestPackage(PackageInterface $package, Composer $composer
$targetVersion = '^' . $package->getVersion();
}

return $versionSelector->findBestCandidate($name, $targetVersion, $bestStability);
$candidate = $versionSelector->findBestCandidate($name, $targetVersion, $bestStability);
while ($candidate instanceof AliasPackage) {
$candidate = $candidate->getAliasOf();
}

return $candidate;
}

private function getRepositorySet(Composer $composer)
Expand Down

0 comments on commit 90a6aa7

Please sign in to comment.