From bc7008270f13203835311022604260ae42d6bf20 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 21 Feb 2014 13:15:54 +0100 Subject: [PATCH] Properly limit to name matches only if necessary --- src/Composer/DependencyResolver/Pool.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Composer/DependencyResolver/Pool.php b/src/Composer/DependencyResolver/Pool.php index 8db4e90a0..56f356baa 100644 --- a/src/Composer/DependencyResolver/Pool.php +++ b/src/Composer/DependencyResolver/Pool.php @@ -300,8 +300,14 @@ class Pool } } + if ($mustMatchName) { + return array_filter($matches, function ($match) use ($name) { + return $match->getName() == $name; + }); + } + // if a package with the required name exists, we ignore providers - if ($nameMatch || $mustMatchName) { + if ($nameMatch) { return $matches; }