mirror of
https://github.com/composer/composer
synced 2025-05-11 09:32:55 +00:00
Fix display of conflicts when a rule has the conflicter out of order, fixes #10355
This commit is contained in:
parent
239638e687
commit
d81298239b
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,6 @@ abstract class Rule
|
|||
$package1 = $this->deduplicateDefaultBranchAlias($pool->literalToPackage($literals[0]));
|
||||
$package2 = $this->deduplicateDefaultBranchAlias($pool->literalToPackage($literals[1]));
|
||||
|
||||
$conflictTarget = $package1->getPrettyString();
|
||||
if ($reasonData = $this->getReasonData()) {
|
||||
// swap literals if they are not in the right order with package2 being the conflicter
|
||||
if ($reasonData->getSource() === $package1->getName()) {
|
||||
|
@ -313,6 +312,7 @@ abstract class Rule
|
|||
// swap literals if they are not in the right order with package2 being the conflicter
|
||||
if ($reasonData->getSource() === $package1->getName()) {
|
||||
list($package2, $package1) = array($package1, $package2);
|
||||
$conflictTarget = $package1->getPrettyName().' '.$reasonData->getPrettyConstraint();
|
||||
}
|
||||
|
||||
// if the conflict is not directly against the package but something it provides/replaces,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue