1
0
Fork 0

Fix logic for composer repository's optional acceptable callable filter

pull/7625/head
Nils Adermann 2018-09-11 14:40:37 +02:00
parent 1228bcdffc
commit 190d263c74
1 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
foreach ($this->getProviderNames() as $providerName) {
if ($name === $providerName) {
$candidates = $this->whatProvides($providerName); // TODO what is the point of this?
$candidates = $this->whatProvides($providerName);
foreach ($candidates as $package) {
if ($name === $package->getName()) {
$pkgConstraint = new Constraint('==', $package->getVersion());
@ -394,7 +394,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
}
}
} else {
if (!$bypassFilters && (!$isPackageAcceptableCallable || !call_user_func($isPackageAcceptableCallable, strtolower($version['name']), VersionParser::parseStability($version['version'])))) {
if (!$bypassFilters && $isPackageAcceptableCallable && !call_user_func($isPackageAcceptableCallable, strtolower($version['name']), VersionParser::parseStability($version['version']))) {
continue;
}