Minor tweaks, refs #2075
parent
b0e72f0910
commit
187017cc0d
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue