diff --git a/src/Composer/Command/ArchiveCommand.php b/src/Composer/Command/ArchiveCommand.php index 9c81832bd..fce178047 100644 --- a/src/Composer/Command/ArchiveCommand.php +++ b/src/Composer/Command/ArchiveCommand.php @@ -112,12 +112,12 @@ EOT if (count($packages) > 1) { $package = $packages[0]; - $io->write('Found multiple matches, selected '.$package.'.'); - $io->write('Alternatives were '.implode(', ', $packages).'.'); + $io->write('Found multiple matches, selected '.$package->getPrettyString().'.'); + $io->write('Alternatives were '.implode(', ', array_map(function ($p) { return $p->getPrettyString(); }, $packages)).'.'); $io->write('Please use a more specific constraint to pick a different package.'); } elseif ($packages) { $package = $packages[0]; - $io->write('Found an exact match '.$package.'.'); + $io->write('Found an exact match '.$package->getPrettyString().'.'); } else { $io->write('Could not find a package matching '.$packageName.'.'); return false;