Check that a repo has no providers when getPackages is called to catch any mis-use
parent
be861f090a
commit
41392ace56
|
@ -89,6 +89,15 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
|
||||||
$this->rootAliases = $rootAliases;
|
$this->rootAliases = $rootAliases;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPackages()
|
||||||
|
{
|
||||||
|
if ($this->hasProviders()) {
|
||||||
|
throw new \LogicException('Composer repositories that have providers can not load the complete list of packages, use getProviderNames instead.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::getPackages();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue