1
0
Fork 0

Merge remote-tracking branch 'Unister/master'

pull/1376/head
Jordi Boggiano 2012-11-29 11:16:19 +01:00
commit d1956d9d24
1 changed files with 8 additions and 2 deletions

View File

@ -258,12 +258,18 @@ EOT
}
uasort($versions, 'version_compare');
$versions = implode(', ', array_keys(array_reverse($versions)));
$versions = array_keys(array_reverse($versions));
// highlight installed version
if ($installedRepo->hasPackage($package)) {
$versions = str_replace($package->getPrettyVersion(), '<info>* ' . $package->getPrettyVersion() . '</info>', $versions);
$installedVersion = $package->getPrettyVersion();
$key = array_search($installedVersion, $versions);
if (FALSE !== $key) {
$versions[$key] = '<info>* ' . $installedVersion . '</info>';
}
}
$versions = implode(', ', $versions);
$output->writeln('<info>versions</info> : ' . $versions);
}