1
0
Fork 0

PoolBuilder: Drop name constraints loop, already set earlier in same code

pull/8557/head
Nils Adermann 2020-01-29 18:00:56 +01:00
parent 59bc957e76
commit bbdbb3517b
2 changed files with 1 additions and 11 deletions

View File

@ -86,18 +86,10 @@ class PoolBuilder
} }
$loadNames[$packageName] = $constraint; $loadNames[$packageName] = $constraint;
// TODO do we even need to set these in name constraints or can we skip them entirely?
$this->nameConstraints[$packageName] = $constraint ? new MultiConstraint(array($constraint), false) : null; $this->nameConstraints[$packageName] = $constraint ? new MultiConstraint(array($constraint), false) : null;
} }
// all the merged constraints from install requests + fixed packages can be applied
// when loading package metadata already, as these are set in stone
foreach ($this->nameConstraints as $package => $constraint) {
if ($constraint !== null && array_key_exists($package, $loadNames)) {
$loadNames[$package] = $constraint;
unset($this->nameConstraints[$package]);
}
}
// clean up loadNames for anything we manually marked loaded above // clean up loadNames for anything we manually marked loaded above
foreach ($loadNames as $name => $void) { foreach ($loadNames as $name => $void) {
if (isset($this->loadedNames[$name])) { if (isset($this->loadedNames[$name])) {

View File

@ -116,8 +116,6 @@ Your requirements could not be resolved to an installable set of packages.
- Root composer.json requires unstable/package 2.*, found unstable/package[2.0.0-alpha] but it does not match your minimum-stability. - Root composer.json requires unstable/package 2.*, found unstable/package[2.0.0-alpha] but it does not match your minimum-stability.
Problem 3 Problem 3
- Root composer.json requires non-existent/pkg, it could not be found in any version, there may be a typo in the package name. - Root composer.json requires non-existent/pkg, it could not be found in any version, there may be a typo in the package name.
Problem 4
- The requested package dependency/pkg could not be found in any version, there may be a typo in the package name.
Problem 4 Problem 4
- Root composer.json requires stable-requiree-excluded/pkg 1.0.1, found stable-requiree-excluded/pkg[1.0.1] but the package is fixed to 1.0.0 (lock file version) by a partial update and that version does not match. Make sure you whitelist it for update. - Root composer.json requires stable-requiree-excluded/pkg 1.0.1, found stable-requiree-excluded/pkg[1.0.1] but the package is fixed to 1.0.0 (lock file version) by a partial update and that version does not match. Make sure you whitelist it for update.
Problem 5 Problem 5