1
0
Fork 0

Merge remote-tracking branch 'SofHad/licenses'

Conflicts:
	src/Composer/Command/LicensesCommand.php
pull/3772/merge
Jordi Boggiano 2015-02-25 17:30:34 +00:00
commit 182cfbc249
1 changed files with 6 additions and 2 deletions

View File

@ -19,6 +19,7 @@ use Composer\Plugin\PluginEvents;
use Composer\Package\PackageInterface;
use Composer\Repository\RepositoryInterface;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableStyle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@ -72,10 +73,13 @@ EOT
$output->writeln('Version: <comment>'.$versionParser->formatVersion($root).'</comment>');
$output->writeln('Licenses: <comment>'.(implode(', ', $root->getLicense()) ?: 'none').'</comment>');
$output->writeln('Dependencies:');
$output->writeln('');
$table = new Table($output);
$table->setStyle('borderless');
$table->getStyle()->setHorizontalBorderChar('');
$table->setStyle('compact');
$table->getStyle()->setVerticalBorderChar('');
$table->getStyle()->setCellRowContentFormat('%s ');
$table->setHeaders(array('Name', 'Version', 'License'));
foreach ($packages as $package) {
$table->addRow(array(
$package->getPrettyName(),