1
0
Fork 0

Properly limit to name matches only if necessary

pull/2733/head
Nils Adermann 2014-02-21 13:15:54 +01:00
parent ec12b8a675
commit bc7008270f
1 changed files with 7 additions and 1 deletions

View File

@ -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;
}