1
0
Fork 0

Check that a repo has no providers when getPackages is called to catch any mis-use

pull/1681/head
Jordi Boggiano 2013-03-10 13:33:41 +01:00
parent be861f090a
commit 41392ace56
1 changed files with 9 additions and 0 deletions

View File

@ -89,6 +89,15 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
$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}
*/