1
0
Fork 0

Allow optimizing fetching of dev versions only if no other stability is needed

pull/9026/head
Jordi Boggiano 2020-06-25 08:57:42 +02:00
parent a133e694d0
commit e2f1e8aed6
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 4 additions and 0 deletions

View File

@ -676,6 +676,10 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
if ($acceptableStabilities === null || $stabilityFlags === null || StabilityFilter::isPackageAcceptable($acceptableStabilities, $stabilityFlags, array($name), 'dev')) {
$packageNames[$name.'~dev'] = $constraint;
}
// if only dev stability is requested, we skip loading the non dev file
if (isset($acceptableStabilities['dev']) && count($acceptableStabilities) === 1 && count($stabilityFlags) === 0) {
unset($packageNames[$name]);
}
}
foreach ($packageNames as $name => $constraint) {