loadDev parameter is nonsense, properly load packages in create command
parent
da02c53540
commit
ec5416f03c
|
@ -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);
|
||||
|
|
|
@ -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')
|
||||
);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue