diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 299e96fe4..5e8bf262a 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -165,10 +165,12 @@ EOT $versions = array(); foreach ($repos->findPackages($package->getName()) as $version) { - $versions[$version->getPrettyVersion()] = true; + $versions[$version->getPrettyVersion()] = $version->getVersion(); } - $versions = join(', ', array_keys($versions)); + uasort($versions, 'version_compare'); + + $versions = join(', ', array_keys(array_reverse($versions))); // highlight installed version if ($installedRepo->hasPackage($package)) { @@ -193,4 +195,4 @@ EOT } } } -} \ No newline at end of file +}