mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Add verbosity input support to IOInterface
This commit is contained in:
parent
a9cb931896
commit
49d7d65933
31 changed files with 186 additions and 224 deletions
|
@ -246,10 +246,10 @@ EOT
|
|||
$writeDescription = !$input->getOption('name-only') && !$input->getOption('path') && ($nameLength + ($showVersion ? $versionLength : 0) + 24 <= $width);
|
||||
foreach ($packages[$type] as $package) {
|
||||
if (is_object($package)) {
|
||||
$output->write($indent . str_pad($package->getPrettyName(), $nameLength, ' '), false);
|
||||
$io->write($indent . str_pad($package->getPrettyName(), $nameLength, ' '), false);
|
||||
|
||||
if ($writeVersion) {
|
||||
$output->write(' ' . str_pad($package->getFullPrettyVersion(), $versionLength, ' '), false);
|
||||
$io->write(' ' . str_pad($package->getFullPrettyVersion(), $versionLength, ' '), false);
|
||||
}
|
||||
|
||||
if ($writeDescription) {
|
||||
|
@ -258,15 +258,15 @@ EOT
|
|||
if (strlen($description) > $remaining) {
|
||||
$description = substr($description, 0, $remaining - 3) . '...';
|
||||
}
|
||||
$output->write(' ' . $description);
|
||||
$io->write(' ' . $description, false);
|
||||
}
|
||||
|
||||
if ($writePath) {
|
||||
$path = strtok(realpath($composer->getInstallationManager()->getInstallPath($package)), "\r\n");
|
||||
$output->write(' ' . $path);
|
||||
$io->write(' ' . $path, false);
|
||||
}
|
||||
} else {
|
||||
$output->write($indent . $package);
|
||||
$io->write($indent . $package, false);
|
||||
}
|
||||
$io->write('');
|
||||
}
|
||||
|
@ -489,10 +489,10 @@ EOT
|
|||
$packagesInTree = array();
|
||||
$packagesInTree[] = $package;
|
||||
|
||||
$output->write(sprintf('<info>%s</info>', $package->getPrettyName()));
|
||||
$output->write(' ' . $package->getPrettyVersion());
|
||||
$output->write(' ' . strtok($package->getDescription(), "\r\n"));
|
||||
$output->writeln('');
|
||||
$io = $this->getIO();
|
||||
$io->write(sprintf('<info>%s</info>', $package->getPrettyName()), false);
|
||||
$io->write(' ' . $package->getPrettyVersion(), false);
|
||||
$io->write(' ' . strtok($package->getDescription(), "\r\n"));
|
||||
|
||||
if (is_object($package)) {
|
||||
$requires = $package->getRequires();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue