diff --git a/src/Composer/Repository/ArrayRepository.php b/src/Composer/Repository/ArrayRepository.php index 8d3898f3d..36ed56b0b 100644 --- a/src/Composer/Repository/ArrayRepository.php +++ b/src/Composer/Repository/ArrayRepository.php @@ -48,10 +48,15 @@ class ArrayRepository implements RepositoryInterface { // normalize name $name = strtolower($name); + $packages = array(); - return array_filter($this->getPackages(), function (PackageInterface $package) use ($name) { - return $package->getName() === $name; - }); + foreach ($this->getPackages() as $package) { + if ($package->getName() === $name) { + $packages[] = $package; + } + } + + return $packages; } /**