diff --git a/src/Composer/Repository/ArrayRepository.php b/src/Composer/Repository/ArrayRepository.php index 07f648e0f..49ddd99d5 100644 --- a/src/Composer/Repository/ArrayRepository.php +++ b/src/Composer/Repository/ArrayRepository.php @@ -118,7 +118,7 @@ class ArrayRepository implements RepositoryInterface public function filterPackages($callback, $class = 'Composer\Package\Package') { foreach ($this->getPackages() as $package) { - if (false === $callback($package)) { + if (false === call_user_func($callback, $package)) { return false; } } diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 123e08bce..0ea86e5e8 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -135,11 +135,11 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository } foreach ($this->rawData as $package) { - if (false === $callback($package = $this->loader->load($package, $class))) { + if (false === call_user_func($callback, $package = $this->loader->load($package, $class))) { return false; } if ($package->getAlias()) { - if (false === $callback($this->createAliasPackage($package))) { + if (false === call_user_func($callback, $this->createAliasPackage($package))) { return false; } }