diff --git a/src/Composer/Command/DependsCommand.php b/src/Composer/Command/DependsCommand.php index b4017c2fe..ef0f36e4d 100644 --- a/src/Composer/Command/DependsCommand.php +++ b/src/Composer/Command/DependsCommand.php @@ -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();