1
0
Fork 0

Load ~dev files as well as main provider files for new v2 protocol, fixes #6415

pull/7906/head^2
Jordi Boggiano 2019-02-20 08:42:49 +01:00
parent 65903aacfd
commit ff82334124
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 7 additions and 0 deletions

View File

@ -581,6 +581,13 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
throw new \LogicException('loadAsyncPackages only supports v2 protocol composer repos with a metadata-url'); throw new \LogicException('loadAsyncPackages only supports v2 protocol composer repos with a metadata-url');
} }
// load ~dev variants as well if present
// TODO ideally there should be a flag set from the repositoryset/poolbuilder to know which packages should have the dev packages loaded
// so we can optimize away some requests entirely
foreach ($packageNames as $name => $constraint) {
$packageNames[$name.'~dev'] = $constraint;
}
foreach ($packageNames as $name => $constraint) { foreach ($packageNames as $name => $constraint) {
$name = strtolower($name); $name = strtolower($name);