1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Merge branch '1.5'

This commit is contained in:
Jordi Boggiano 2017-11-03 19:53:36 +01:00
commit 26a50b3762
5 changed files with 70 additions and 11 deletions

View file

@ -43,6 +43,7 @@ use Composer\Semver\Semver;
* @author Robert Schönthal <seroscho@googlemail.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Jérémy Romey <jeremyFreeAgent>
* @author Mihai Plasoianu <mihai@plasoianu.de>
*/
class ShowCommand extends BaseCommand
{
@ -196,9 +197,13 @@ EOT
$this->displayPackageTree($package, $installedRepo, $repos);
} else {
$latestPackage = null;
$exitCode = 0;
if ($input->getOption('latest')) {
$latestPackage = $this->findLatestPackage($package, $composer, $phpVersion);
}
if ($input->getOption('outdated') && $input->getOption('strict') && $latestPackage && $latestPackage->getFullPrettyVersion() !== $package->getFullPrettyVersion() && !$latestPackage->isAbandoned()) {
$exitCode = 1;
}
$this->printMeta($package, $versions, $installedRepo, $latestPackage ?: null);
$this->printLinks($package, 'requires');
$this->printLinks($package, 'devRequires', 'requires (dev)');
@ -213,7 +218,7 @@ EOT
$this->printLinks($package, 'replaces');
}
return;
return $exitCode;
}
// show tree view if requested