diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php index 65366dfe2..299758311 100644 --- a/src/Composer/Command/CreateProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -276,6 +276,7 @@ EOT $pool = new Pool($stability); $pool->addRepository($sourceRepo); + $pool->loadRecursively(array($name)); // find the latest version if there are multiple $versionSelector = new VersionSelector($pool); diff --git a/src/Composer/DependencyResolver/Pool.php b/src/Composer/DependencyResolver/Pool.php index 059cbfc0d..566c6e262 100644 --- a/src/Composer/DependencyResolver/Pool.php +++ b/src/Composer/DependencyResolver/Pool.php @@ -167,7 +167,7 @@ class Pool return $this->packages[$id - 1]; } - public function loadRecursively(array $packageNames, $loadDev) + public function loadRecursively(array $packageNames) { $loadedMap = array(); do { @@ -177,7 +177,6 @@ class Pool foreach ($this->providerRepos as $repo) { $packages = $repo->loadRecursively( $packageNames, - $loadDev, array($this, 'isPackageAcceptable') ); diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php index 7dd947acf..bcfd08388 100644 --- a/src/Composer/DependencyResolver/Solver.php +++ b/src/Composer/DependencyResolver/Solver.php @@ -179,7 +179,7 @@ class Solver } } - $this->pool->loadRecursively(array_keys($packageNames), true); + $this->pool->loadRecursively(array_keys($packageNames)); $this->rules = $this->ruleSetGenerator->getRulesFor($this->jobs, $this->installedMap, $ignorePlatformReqs); $this->checkForRootRequireProblems($ignorePlatformReqs); diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 89c2b75b2..62b6847af 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -100,7 +100,7 @@ class ComposerRepository extends ArrayRepository return $this->rootAliases; } - public function loadRecursively(array $packageNames, $loadDev, $acceptableCallback) + public function loadRecursively(array $packageNames, $acceptableCallback) { $workQueue = new \SplQueue; @@ -123,9 +123,6 @@ class ComposerRepository extends ArrayRepository foreach ($packages as $package) { $loadedPackages[] = $package; $requires = $package->getRequires(); - if ($loadDev) { - $requires = array_merge($requires, $package->getDevRequires()); - } foreach ($requires as $link) { $workQueue->enqueue($link->getTarget()); } diff --git a/tests/Composer/Test/Repository/ComposerRepositoryTest.php b/tests/Composer/Test/Repository/ComposerRepositoryTest.php index 4e4fc99bb..1c63feb1a 100644 --- a/tests/Composer/Test/Repository/ComposerRepositoryTest.php +++ b/tests/Composer/Test/Repository/ComposerRepositoryTest.php @@ -147,7 +147,7 @@ class ComposerRepositoryTest extends TestCase $versionParser = new VersionParser(); $that = $this; - $packages = $repo->loadRecursively(array('a'), true, function ($name, $stability) use ($that) { + $packages = $repo->loadRecursively(array('a'), function ($name, $stability) use ($that) { $this->assertEquals('a', $name); return true; });