mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Fix logic for composer repository's optional acceptable callable filter
This commit is contained in:
parent
1228bcdffc
commit
190d263c74
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue