1
0
Fork 0

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
Bryan Davis 2015-10-26 20:33:36 -06:00 committed by Bryan Davis
parent edf14dab15
commit 2eb0af264b
1 changed files with 27 additions and 0 deletions

View File

@ -82,6 +82,33 @@ class RootAliasPackage extends AliasPackage implements RootPackageInterface
$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()
{
parent::__clone();