1
0
Fork 0

Show version for platform/installed packages, fixes #825

pull/832/head
Jordi Boggiano 2012-06-24 17:13:50 +02:00
parent fc8d92e7a2
commit fd776853a4
1 changed files with 2 additions and 2 deletions

View File

@ -110,12 +110,12 @@ EOT
$packages[$type][$package->getName()] = $package;
}
foreach (array('<info>platform</info>:', '<comment>available</comment>:', '<info>installed</info>:') as $type) {
foreach (array('<info>platform</info>:' => true, '<comment>available</comment>:' => false, '<info>installed</info>:' => true) as $type => $showVersion) {
if (isset($packages[$type])) {
$output->writeln($type);
ksort($packages[$type]);
foreach ($packages[$type] as $package) {
$output->writeln(' '.$package->getPrettyName() .' <comment>:</comment> '. strtok($package->getDescription(), "\r\n"));
$output->writeln(' '.$package->getPrettyName() .' '.($showVersion ? '['.$package->getPrettyVersion().']' : '').' <comment>:</comment> '. strtok($package->getDescription(), "\r\n"));
}
$output->writeln('');
}