diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 449825532..514ccb9bf 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -394,7 +394,17 @@ EOT $exactMatch = null; $choices = array(); foreach ($matches as $position => $foundPackage) { - $choices[] = sprintf(' %5s %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('Abandoned. %s.', $replacement); + } + + $choices[] = sprintf(' %5s %s %s',"[$position]", $foundPackage['name'], $abandoned); if ($foundPackage['name'] === $package) { $exactMatch = true; break;