1
0
Fork 0

Fix platform packages not being added to the pool

pull/61/head
Jordi Boggiano 2011-10-23 21:10:45 +02:00
parent 5e52d5c1ad
commit 8b0fee3f35
1 changed files with 5 additions and 3 deletions

View File

@ -50,9 +50,13 @@ EOT
{ {
$composer = $this->getComposer(); $composer = $this->getComposer();
// create installed repo
$localRepo = $composer->getRepositoryManager()->getLocalRepository();
$installedRepo = new PlatformRepository($localRepo);
// creating repository pool // creating repository pool
$pool = new Pool; $pool = new Pool;
$pool->addRepository($composer->getRepositoryManager()->getLocalRepository()); $pool->addRepository($installedRepo);
foreach ($composer->getRepositoryManager()->getRepositories() as $repository) { foreach ($composer->getRepositoryManager()->getRepositories() as $repository) {
$pool->addRepository($repository); $pool->addRepository($repository);
} }
@ -74,8 +78,6 @@ EOT
// prepare solver // prepare solver
$installationManager = $composer->getInstallationManager(); $installationManager = $composer->getInstallationManager();
$localRepo = $composer->getRepositoryManager()->getLocalRepository();
$installedRepo = new PlatformRepository($localRepo);
$policy = new DependencyResolver\DefaultPolicy(); $policy = new DependencyResolver\DefaultPolicy();
$solver = new DependencyResolver\Solver($policy, $pool, $installedRepo); $solver = new DependencyResolver\Solver($policy, $pool, $installedRepo);