From 5ed01fb60d6b9056630ead23dcd96327c332ad86 Mon Sep 17 00:00:00 2001 From: Rafael Dohms Date: Thu, 2 Oct 2014 23:19:27 +0200 Subject: [PATCH] Abandoned support in `show` Executing `composer show` on an abandoned package displays the warnings for package status. --- src/Composer/Command/ShowCommand.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index dbf41ceb9..28ea81028 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -294,6 +294,16 @@ EOT $output->writeln('dist : ' . sprintf('[%s] %s %s', $package->getDistType(), $package->getDistUrl(), $package->getDistReference())); $output->writeln('names : ' . implode(', ', $package->getNames())); + if ($package->isAbandoned()) { + $replacement = ($package->getReplacementPackage() !== null) + ? ' The author suggests using the ' . $package->getReplacementPackage(). ' package instead.' + : null; + + $output->writeln( + sprintf('Attention: This package is abandoned and no longer maintained.%s', $replacement) + ); + } + if ($package->getSupport()) { $output->writeln("\nsupport"); foreach ($package->getSupport() as $type => $value) {