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.
parent
16941adb49
commit
7308049056
|
@ -91,6 +91,17 @@ class CompositeRepository implements RepositoryInterface
|
||||||
return call_user_func_array('array_merge', $packages);
|
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}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -57,4 +57,11 @@ interface RepositoryInterface extends \Countable
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getPackages();
|
function getPackages();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @abstract
|
||||||
|
* @param \Composer\Package\PackageInterface $package
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function removePackage(PackageInterface $package);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue