Report validation error if a package replaces and conflicts against the same name, fixes #9845
parent
c15eba3fe3
commit
deaec7c0ac
|
@ -281,6 +281,11 @@ class ValidatingArrayLoader implements LoaderInterface
|
|||
$this->warnings[] = $linkType.'.'.$package.' : exact version constraints ('.$constraint.') should be avoided if the package follows semantic versioning';
|
||||
}
|
||||
}
|
||||
|
||||
if ($linkType === 'conflict' && isset($this->config['replace']) && $keys = array_intersect_key($this->config['replace'], $this->config['conflict'])) {
|
||||
$this->errors[] = $linkType.'.'.$package.' : you cannot conflict with a package that is also replaced, as replace already creates an implicit conflict rule';
|
||||
unset($this->config[$linkType][$package]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue