function ShowCommand::printPackageInfo
Prints package info.
Parameters
array<string, string> $versions:
1 call to ShowCommand::printPackageInfo()
- ShowCommand::execute in vendor/
composer/ composer/ src/ Composer/ Command/ ShowCommand.php - Executes the current command.
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ ShowCommand.php, line 854
Class
- ShowCommand
- @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>
Namespace
Composer\CommandCode
protected function printPackageInfo(CompletePackageInterface $package, array $versions, InstalledRepository $installedRepo, ?PackageInterface $latestPackage = null) : void {
$io = $this->getIO();
$this->printMeta($package, $versions, $installedRepo, $latestPackage ?: null);
$this->printLinks($package, Link::TYPE_REQUIRE);
$this->printLinks($package, Link::TYPE_DEV_REQUIRE, 'requires (dev)');
if ($package->getSuggests()) {
$io->write("\n<info>suggests</info>");
foreach ($package->getSuggests() as $suggested => $reason) {
$io->write($suggested . ' <comment>' . $reason . '</comment>');
}
}
$this->printLinks($package, Link::TYPE_PROVIDE);
$this->printLinks($package, Link::TYPE_CONFLICT);
$this->printLinks($package, Link::TYPE_REPLACE);
}