List relevant conflicts in why/why-not, fixes #9693
parent
09639a0cfc
commit
8da3b3b9be
|
@ -165,6 +165,18 @@ class InstalledRepository extends CompositeRepository
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List conflicts against X as they may explain why the current version was selected, or explain why it is rejected if the conflict matched when inverting
|
||||||
|
foreach ($package->getConflicts() as $link) {
|
||||||
|
if (in_array($link->getTarget(), $needles)) {
|
||||||
|
foreach ($this->findPackages($link->getTarget()) as $pkg) {
|
||||||
|
$version = new Constraint('=', $pkg->getVersion());
|
||||||
|
if ($link->getConstraint()->matches($version) === $invert) {
|
||||||
|
$results[] = array($package, $link, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// When inverting, we need to check for conflicts of the needles' requirements against installed packages
|
// When inverting, we need to check for conflicts of the needles' requirements against installed packages
|
||||||
if ($invert && $constraint && in_array($package->getName(), $needles) && $constraint->matches(new Constraint('=', $package->getVersion()))) {
|
if ($invert && $constraint && in_array($package->getName(), $needles) && $constraint->matches(new Constraint('=', $package->getVersion()))) {
|
||||||
foreach ($package->getRequires() as $link) {
|
foreach ($package->getRequires() as $link) {
|
||||||
|
|
Loading…
Reference in New Issue