1
0
Fork 0

Add fallback for findPackage(s) for repo without provider

This was introcuced in a4d43ee860, but is missing the fallback for a repository without providers.
pull/3363/head
aaukt 2014-10-17 09:10:47 +02:00
parent b0cabd1e98
commit f8fae61b05
1 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,9 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
*/
public function findPackage($name, $version)
{
if (!$this->hasProviders()) {
return parent::findPackage($name, $version);
}
// normalize version & name
$versionParser = new VersionParser();
$version = $versionParser->normalize($version);
@ -125,6 +128,9 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
*/
public function findPackages($name, $version = null)
{
if (!$this->hasProviders()) {
return parent::findPackages($name, $version);
}
// normalize name
$name = strtolower($name);