Merge branch '2.2'
commit
e34c31dd8b
|
@ -711,7 +711,14 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
if ($this->providersApiUrl) {
|
if ($this->providersApiUrl) {
|
||||||
|
try {
|
||||||
$apiResult = $this->httpDownloader->get(str_replace('%package%', $packageName, $this->providersApiUrl), $this->options)->decodeJson();
|
$apiResult = $this->httpDownloader->get(str_replace('%package%', $packageName, $this->providersApiUrl), $this->options)->decodeJson();
|
||||||
|
} catch (TransportException $e) {
|
||||||
|
if ($e->getStatusCode() === 404) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($apiResult['providers'] as $provider) {
|
foreach ($apiResult['providers'] as $provider) {
|
||||||
$result[$provider['name']] = $provider;
|
$result[$provider['name']] = $provider;
|
||||||
|
|
Loading…
Reference in New Issue