diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index a1a5ffc8b22e..b77853d23492 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -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)