mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Add setters used by composer-merge-plugin to RootPackageInterface
Extend RootPackageInterface with setter functions used by composer-merge-plugin and implement them for RootAliasPackage. This will allow composer-merge-plugin and similar code that manipulates the root package at runtime to ignore the difference between a RootPackage and a RootAliasPackage.
This commit is contained in:
parent
2eb0af264b
commit
06c44ce998
3 changed files with 203 additions and 0 deletions
|
@ -109,6 +109,54 @@ class RootAliasPackage extends AliasPackage implements RootPackageInterface
|
|||
$this->aliasOf->setReplaces($replaces);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setRepositories($repositories)
|
||||
{
|
||||
$this->aliasOf->setRepositories($repositories);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setAutoload(array $autoload)
|
||||
{
|
||||
$this->aliasOf->setAutoload($autoload);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setDevAutoload(array $devAutoload)
|
||||
{
|
||||
$this->aliasOf->setDevAutoload($devAutoload);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setStabilityFlags(array $stabilityFlags)
|
||||
{
|
||||
$this->aliasOf->setStabilityFlags($stabilityFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setSuggests(array $suggests)
|
||||
{
|
||||
$this->aliasOf->setSuggests($suggests);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setExtra(array $extra)
|
||||
{
|
||||
$this->aliasOf->setExtra($extra);
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
parent::__clone();
|
||||
|
|
|
@ -71,4 +71,65 @@ interface RootPackageInterface extends CompletePackageInterface
|
|||
* @param array $devRequires A set of package links
|
||||
*/
|
||||
public function setDevRequires(array $devRequires);
|
||||
|
||||
/**
|
||||
* Set the conflicting packages
|
||||
*
|
||||
* @param array $conflicts A set of package links
|
||||
*/
|
||||
public function setConflicts(array $conflicts);
|
||||
|
||||
/**
|
||||
* Set the provided virtual packages
|
||||
*
|
||||
* @param array $provides A set of package links
|
||||
*/
|
||||
public function setProvides(array $provides);
|
||||
|
||||
/**
|
||||
* Set the packages this one replaces
|
||||
*
|
||||
* @param array $replaces A set of package links
|
||||
*/
|
||||
public function setReplaces(array $replaces);
|
||||
|
||||
/**
|
||||
* Set the repositories
|
||||
*
|
||||
* @param array $repositories
|
||||
*/
|
||||
public function setRepositories($repositories);
|
||||
|
||||
/**
|
||||
* Set the autoload mapping
|
||||
*
|
||||
* @param array $autoload Mapping of autoloading rules
|
||||
*/
|
||||
public function setAutoload(array $autoload);
|
||||
|
||||
/**
|
||||
* Set the dev autoload mapping
|
||||
*
|
||||
* @param array $devAutoload Mapping of dev autoloading rules
|
||||
*/
|
||||
public function setDevAutoload(array $devAutoload);
|
||||
|
||||
/**
|
||||
* Set the stabilityFlags
|
||||
*
|
||||
* @param array $stabilityFlags
|
||||
*/
|
||||
public function setStabilityFlags(array $stabilityFlags);
|
||||
|
||||
/**
|
||||
* Set the suggested packages
|
||||
*
|
||||
* @param array $suggests A set of package names/comments
|
||||
*/
|
||||
public function setSuggests(array $suggests);
|
||||
|
||||
/**
|
||||
* @param array $extra
|
||||
*/
|
||||
public function setExtra(array $extra);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue