From 8b0fee3f35bf67ec6e525bf732ba1f264278b5dd Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 23 Oct 2011 21:10:45 +0200 Subject: [PATCH] Fix platform packages not being added to the pool --- src/Composer/Command/InstallCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index b91122d51..56209ba1c 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -50,9 +50,13 @@ EOT { $composer = $this->getComposer(); + // create installed repo + $localRepo = $composer->getRepositoryManager()->getLocalRepository(); + $installedRepo = new PlatformRepository($localRepo); + // creating repository pool $pool = new Pool; - $pool->addRepository($composer->getRepositoryManager()->getLocalRepository()); + $pool->addRepository($installedRepo); foreach ($composer->getRepositoryManager()->getRepositories() as $repository) { $pool->addRepository($repository); } @@ -74,8 +78,6 @@ EOT // prepare solver $installationManager = $composer->getInstallationManager(); - $localRepo = $composer->getRepositoryManager()->getLocalRepository(); - $installedRepo = new PlatformRepository($localRepo); $policy = new DependencyResolver\DefaultPolicy(); $solver = new DependencyResolver\Solver($policy, $pool, $installedRepo);