mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Add deprecated notice to show command
This commit is contained in:
parent
ac606e4dc1
commit
80be9a2c98
1 changed files with 16 additions and 0 deletions
|
@ -294,6 +294,22 @@ EOT
|
|||
$path = strtok(realpath($composer->getInstallationManager()->getInstallPath($package)), "\r\n");
|
||||
$io->write(' ' . $path, false);
|
||||
}
|
||||
|
||||
if ($showLatest && $package->isAbandoned()) {
|
||||
$replacement = (is_string($package->getReplacementPackage()))
|
||||
? 'Use ' . $package->getReplacementPackage() . ' instead'
|
||||
: 'No replacement was suggested';
|
||||
|
||||
$io->write('');
|
||||
$io->write(
|
||||
sprintf(
|
||||
"<warning>Package %s is abandoned, you should avoid using it. %s.</warning>",
|
||||
$package->getPrettyName(),
|
||||
$replacement
|
||||
),
|
||||
false
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$io->write($indent . $package, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue