1
0
Fork 0

Minor tweaks, refs #2075

pull/2175/head
Jordi Boggiano 2013-08-12 01:29:16 +02:00
parent b0e72f0910
commit 187017cc0d
1 changed files with 5 additions and 3 deletions

View File

@ -13,6 +13,7 @@
namespace Composer\Command; namespace Composer\Command;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
use Composer\Json\JsonFile;
use Composer\Package\Version\VersionParser; use Composer\Package\Version\VersionParser;
use Symfony\Component\Console\Helper\TableHelper; use Symfony\Component\Console\Helper\TableHelper;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
@ -44,8 +45,9 @@ EOT
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
$root = $this->getComposer()->getPackage(); $composer = $this->getComposer();
$repo = $this->getComposer()->getRepositoryManager()->getLocalRepository(); $root = $composer->getPackage();
$repo = $composer->getRepositoryManager()->getLocalRepository();
$versionParser = new VersionParser; $versionParser = new VersionParser;
@ -83,7 +85,7 @@ EOT
); );
} }
$output->writeln(json_encode(array( $output->writeln(JsonFile::encode(array(
'name' => $root->getPrettyName(), 'name' => $root->getPrettyName(),
'version' => $versionParser->formatVersion($root), 'version' => $versionParser->formatVersion($root),
'license' => $root->getLicense(), 'license' => $root->getLicense(),