1
0
Fork 0

Fix depends command to also show when the root package depends on something

pull/4621/head
Jordi Boggiano 2015-11-19 17:42:08 +00:00
parent bd76506dd8
commit dbcf8cae13
1 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,8 @@
namespace Composer\Command;
use Composer\DependencyResolver\Pool;
use Composer\Repository\ArrayRepository;
use Composer\Repository\CompositeRepository;
use Composer\Plugin\CommandEvent;
use Composer\Plugin\PluginEvents;
use Symfony\Component\Console\Input\InputInterface;
@ -57,7 +59,10 @@ EOT
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'depends', $input, $output);
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
$repo = $composer->getRepositoryManager()->getLocalRepository();
$repo = new CompositeRepository(array(
new ArrayRepository(array($composer->getPackage())),
$composer->getRepositoryManager()->getLocalRepository(),
));
$needle = $input->getArgument('package');
$pool = new Pool();