mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Try to load packages from lock file only and avoid loading other versions for pinned packages
This commit is contained in:
parent
de189c1b80
commit
e50f78043a
5 changed files with 45 additions and 32 deletions
|
@ -20,6 +20,7 @@ use Composer\Package\Version\VersionParser;
|
|||
use Composer\Repository\CompositeRepository;
|
||||
use Composer\Repository\PlatformRepository;
|
||||
use Composer\Repository\LockArrayRepository;
|
||||
use Composer\Repository\InstalledRepositoryInterface;
|
||||
use Composer\Semver\Constraint\ConstraintInterface;
|
||||
use Composer\Test\DependencyResolver\PoolTest;
|
||||
|
||||
|
@ -147,6 +148,12 @@ class RepositorySet
|
|||
{
|
||||
$poolBuilder = new PoolBuilder(array($this, 'isPackageAcceptable'), $this->rootRequires);
|
||||
|
||||
foreach ($this->repositories as $repo) {
|
||||
if ($repo instanceof InstalledRepositoryInterface) {
|
||||
throw new \LogicException('The pool can not accept packages from an installed repository');
|
||||
}
|
||||
}
|
||||
|
||||
return $this->pool = $poolBuilder->buildPool($this->repositories, $this->rootAliases, $this->rootReferences, $request);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue