1
0
Fork 0

Merge pull request #3363 from aaukt/master

Add fallback for findPackage(s) for repo without provider
pull/3365/head
Jordi Boggiano 2014-10-17 16:48:51 +01:00
commit 0c5e178b9d
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);