1
0
Fork 0

Abandoned support in `show`

Executing `composer show` on an abandoned package displays the warnings for package status.
pull/3325/head
Rafael Dohms 2014-10-02 23:19:27 +02:00
parent d6d087d348
commit 5ed01fb60d
1 changed files with 10 additions and 0 deletions

View File

@ -294,6 +294,16 @@ EOT
$output->writeln('<info>dist</info> : ' . sprintf('[%s] <comment>%s</comment> %s', $package->getDistType(), $package->getDistUrl(), $package->getDistReference()));
$output->writeln('<info>names</info> : ' . implode(', ', $package->getNames()));
if ($package->isAbandoned()) {
$replacement = ($package->getReplacementPackage() !== null)
? ' The author suggests using the ' . $package->getReplacementPackage(). ' package instead.'
: null;
$output->writeln(
sprintf('<error>Attention: This package is abandoned and no longer maintained.%s</error>', $replacement)
);
}
if ($package->getSupport()) {
$output->writeln("\n<info>support</info>");
foreach ($package->getSupport() as $type => $value) {