mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Added removePackage() to Repository\RepositoryInterface in order to provide to be able to rely on the existance of this method in all repositories. Had to add this method to the Repository\CompositeRepository.
This commit is contained in:
parent
16941adb49
commit
7308049056
2 changed files with 18 additions and 0 deletions
|
@ -91,6 +91,17 @@ class CompositeRepository implements RepositoryInterface
|
|||
return call_user_func_array('array_merge', $packages);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function removePackage(PackageInterface $package)
|
||||
{
|
||||
foreach($this->repositories as $repository) {
|
||||
/* @var $repository RepositoryInterface */
|
||||
$repository->removePackage($package);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
@ -57,4 +57,11 @@ interface RepositoryInterface extends \Countable
|
|||
* @return array
|
||||
*/
|
||||
function getPackages();
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param \Composer\Package\PackageInterface $package
|
||||
* @return void
|
||||
*/
|
||||
function removePackage(PackageInterface $package);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue