Allow RootAliasPackage to override cached values
AliasPackage caches the values of 'requires', 'devRequires', 'conflicts', 'provides', 'replaces' locally to allow `self.version` references to be properly updated to reference the alias. Plugins like composer-merge-plugin that manipulate these settings at runtime need to be able to change the values after alias construction.pull/4542/head
parent
edf14dab15
commit
2eb0af264b
|
@ -82,6 +82,33 @@ class RootAliasPackage extends AliasPackage implements RootPackageInterface
|
||||||
$this->aliasOf->setDevRequires($devRequire);
|
$this->aliasOf->setDevRequires($devRequire);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function setConflicts(array $conflicts)
|
||||||
|
{
|
||||||
|
$this->conflicts = $this->replaceSelfVersionDependencies($conflicts, 'conflicts');
|
||||||
|
$this->aliasOf->setConflicts($conflicts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function setProvides(array $provides)
|
||||||
|
{
|
||||||
|
$this->provides = $this->replaceSelfVersionDependencies($provides, 'provides');
|
||||||
|
$this->aliasOf->setProvides($provides);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function setReplaces(array $replaces)
|
||||||
|
{
|
||||||
|
$this->replaces = $this->replaceSelfVersionDependencies($replaces, 'replaces');
|
||||||
|
$this->aliasOf->setReplaces($replaces);
|
||||||
|
}
|
||||||
|
|
||||||
public function __clone()
|
public function __clone()
|
||||||
{
|
{
|
||||||
parent::__clone();
|
parent::__clone();
|
||||||
|
|
Loading…
Reference in New Issue