Merge remote-tracking branch 'arjank/abandoned_package_warning'
commit
fedef55362
|
@ -394,7 +394,17 @@ EOT
|
||||||
$exactMatch = null;
|
$exactMatch = null;
|
||||||
$choices = array();
|
$choices = array();
|
||||||
foreach ($matches as $position => $foundPackage) {
|
foreach ($matches as $position => $foundPackage) {
|
||||||
$choices[] = sprintf(' <info>%5s</info> %s', "[$position]", $foundPackage['name']);
|
$abandoned = '';
|
||||||
|
if (isset($foundPackage['abandoned'])) {
|
||||||
|
if (is_string($foundPackage['abandoned'])) {
|
||||||
|
$replacement = sprintf('Use %s instead', $foundPackage['abandoned']);
|
||||||
|
} else {
|
||||||
|
$replacement = 'No replacement was suggested';
|
||||||
|
}
|
||||||
|
$abandoned = sprintf('<warning>Abandoned. %s.</warning>', $replacement);
|
||||||
|
}
|
||||||
|
|
||||||
|
$choices[] = sprintf(' <info>%5s</info> %s %s',"[$position]", $foundPackage['name'], $abandoned);
|
||||||
if ($foundPackage['name'] === $package) {
|
if ($foundPackage['name'] === $package) {
|
||||||
$exactMatch = true;
|
$exactMatch = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue