From 014e9d5dd19fbd4792334e90463820f88654c9d8 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Thu, 7 May 2020 22:25:42 +0200 Subject: [PATCH] Fixed last remaining pool builder test --- src/Composer/DependencyResolver/PoolBuilder.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Composer/DependencyResolver/PoolBuilder.php b/src/Composer/DependencyResolver/PoolBuilder.php index 6230b6092..9de2d8e6a 100644 --- a/src/Composer/DependencyResolver/PoolBuilder.php +++ b/src/Composer/DependencyResolver/PoolBuilder.php @@ -124,12 +124,13 @@ class PoolBuilder } foreach ($request->getFixedPackages() as $package) { - $this->loadedPackages[$package->getName()] = new Constraint('==', $package->getVersion()); + // using EmptyConstraint here because fixed packages do not need to retrigger + // loading any packages + $this->loadedPackages[$package->getName()] = new EmptyConstraint(); // replace means conflict, so if a fixed package replaces a name, no need to load that one, packages would conflict anyways foreach ($package->getReplaces() as $link) { - $this->loadedPackages[$link->getTarget()] = $link->getConstraint(); - $this->skippedLoad[$link->getTarget()] = $package->getName(); + $this->loadedPackages[$link->getTarget()] = new EmptyConstraint(); } // TODO in how far can we do the above for conflicts? It's more tricky cause conflicts can be limited to