1
0
Fork 0

Remove usage of 5.6+ constant

pull/8836/head
Jordi Boggiano 2020-04-22 16:40:28 +02:00
parent 8ea787baa1
commit c2f77d80bd
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 3 deletions

View File

@ -363,9 +363,11 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
if ($this->lazyProvidersUrl && count($packageNameMap)) {
if (is_array($this->availablePackages)) {
$availPackages = $this->availablePackages;
$packageNameMap = array_filter($packageNameMap, function ($name) use ($availPackages) {
return isset($availPackages[strtolower($name)]);
}, ARRAY_FILTER_USE_KEY);
foreach ($packageNameMap as $name => $constraint) {
if (!isset($availPackages[strtolower($name)])) {
unset($packageNameMap[$name]);
}
}
}
$result = $this->loadAsyncPackages($packageNameMap, $acceptableStabilities, $stabilityFlags);