loadDev parameter is nonsense, properly load packages in create command
parent
da02c53540
commit
ec5416f03c
|
@ -276,6 +276,7 @@ EOT
|
||||||
|
|
||||||
$pool = new Pool($stability);
|
$pool = new Pool($stability);
|
||||||
$pool->addRepository($sourceRepo);
|
$pool->addRepository($sourceRepo);
|
||||||
|
$pool->loadRecursively(array($name));
|
||||||
|
|
||||||
// find the latest version if there are multiple
|
// find the latest version if there are multiple
|
||||||
$versionSelector = new VersionSelector($pool);
|
$versionSelector = new VersionSelector($pool);
|
||||||
|
|
|
@ -167,7 +167,7 @@ class Pool
|
||||||
return $this->packages[$id - 1];
|
return $this->packages[$id - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadRecursively(array $packageNames, $loadDev)
|
public function loadRecursively(array $packageNames)
|
||||||
{
|
{
|
||||||
$loadedMap = array();
|
$loadedMap = array();
|
||||||
do {
|
do {
|
||||||
|
@ -177,7 +177,6 @@ class Pool
|
||||||
foreach ($this->providerRepos as $repo) {
|
foreach ($this->providerRepos as $repo) {
|
||||||
$packages = $repo->loadRecursively(
|
$packages = $repo->loadRecursively(
|
||||||
$packageNames,
|
$packageNames,
|
||||||
$loadDev,
|
|
||||||
array($this, 'isPackageAcceptable')
|
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->rules = $this->ruleSetGenerator->getRulesFor($this->jobs, $this->installedMap, $ignorePlatformReqs);
|
||||||
$this->checkForRootRequireProblems($ignorePlatformReqs);
|
$this->checkForRootRequireProblems($ignorePlatformReqs);
|
||||||
|
|
|
@ -100,7 +100,7 @@ class ComposerRepository extends ArrayRepository
|
||||||
return $this->rootAliases;
|
return $this->rootAliases;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadRecursively(array $packageNames, $loadDev, $acceptableCallback)
|
public function loadRecursively(array $packageNames, $acceptableCallback)
|
||||||
{
|
{
|
||||||
$workQueue = new \SplQueue;
|
$workQueue = new \SplQueue;
|
||||||
|
|
||||||
|
@ -123,9 +123,6 @@ class ComposerRepository extends ArrayRepository
|
||||||
foreach ($packages as $package) {
|
foreach ($packages as $package) {
|
||||||
$loadedPackages[] = $package;
|
$loadedPackages[] = $package;
|
||||||
$requires = $package->getRequires();
|
$requires = $package->getRequires();
|
||||||
if ($loadDev) {
|
|
||||||
$requires = array_merge($requires, $package->getDevRequires());
|
|
||||||
}
|
|
||||||
foreach ($requires as $link) {
|
foreach ($requires as $link) {
|
||||||
$workQueue->enqueue($link->getTarget());
|
$workQueue->enqueue($link->getTarget());
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ class ComposerRepositoryTest extends TestCase
|
||||||
$versionParser = new VersionParser();
|
$versionParser = new VersionParser();
|
||||||
|
|
||||||
$that = $this;
|
$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);
|
$this->assertEquals('a', $name);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue