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
parent
b0cabd1e98
commit
f8fae61b05
|
@ -103,6 +103,9 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
|
||||||
*/
|
*/
|
||||||
public function findPackage($name, $version)
|
public function findPackage($name, $version)
|
||||||
{
|
{
|
||||||
|
if (!$this->hasProviders()) {
|
||||||
|
return parent::findPackage($name, $version);
|
||||||
|
}
|
||||||
// normalize version & name
|
// normalize version & name
|
||||||
$versionParser = new VersionParser();
|
$versionParser = new VersionParser();
|
||||||
$version = $versionParser->normalize($version);
|
$version = $versionParser->normalize($version);
|
||||||
|
@ -125,6 +128,9 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
|
||||||
*/
|
*/
|
||||||
public function findPackages($name, $version = null)
|
public function findPackages($name, $version = null)
|
||||||
{
|
{
|
||||||
|
if (!$this->hasProviders()) {
|
||||||
|
return parent::findPackages($name, $version);
|
||||||
|
}
|
||||||
// normalize name
|
// normalize name
|
||||||
$name = strtolower($name);
|
$name = strtolower($name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue