Add support for info/warnings in every json file loaded by ComposerRepo
parent
001fe8afcf
commit
11ce391222
|
@ -502,10 +502,6 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data['warning'])) {
|
|
||||||
$this->io->writeError('<warning>Warning from '.$this->url.': '.$data['warning'].'</warning>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($data['providers-lazy-url'])) {
|
if (!empty($data['providers-lazy-url'])) {
|
||||||
$this->lazyProvidersUrl = $this->canonicalizeUrl($data['providers-lazy-url']);
|
$this->lazyProvidersUrl = $this->canonicalizeUrl($data['providers-lazy-url']);
|
||||||
$this->hasProviders = true;
|
$this->hasProviders = true;
|
||||||
|
@ -682,6 +678,13 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = JsonFile::parseJson($json, $filename);
|
$data = JsonFile::parseJson($json, $filename);
|
||||||
|
if (!empty($data['warning'])) {
|
||||||
|
$this->io->writeError('<warning>Warning from '.$this->url.': '.$data['warning'].'</warning>');
|
||||||
|
}
|
||||||
|
if (!empty($data['info'])) {
|
||||||
|
$this->io->writeError('<info>Info from '.$this->url.': '.$data['info'].'</info>');
|
||||||
|
}
|
||||||
|
|
||||||
if ($cacheKey) {
|
if ($cacheKey) {
|
||||||
if ($storeLastModifiedTime) {
|
if ($storeLastModifiedTime) {
|
||||||
$lastModifiedDate = $rfs->findHeaderValue($rfs->getLastHeaders(), 'last-modified');
|
$lastModifiedDate = $rfs->findHeaderValue($rfs->getLastHeaders(), 'last-modified');
|
||||||
|
@ -745,6 +748,13 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = JsonFile::parseJson($json, $filename);
|
$data = JsonFile::parseJson($json, $filename);
|
||||||
|
if (!empty($data['warning'])) {
|
||||||
|
$this->io->writeError('<warning>Warning from '.$this->url.': '.$data['warning'].'</warning>');
|
||||||
|
}
|
||||||
|
if (!empty($data['info'])) {
|
||||||
|
$this->io->writeError('<info>Info from '.$this->url.': '.$data['info'].'</info>');
|
||||||
|
}
|
||||||
|
|
||||||
$lastModifiedDate = $rfs->findHeaderValue($rfs->getLastHeaders(), 'last-modified');
|
$lastModifiedDate = $rfs->findHeaderValue($rfs->getLastHeaders(), 'last-modified');
|
||||||
if ($lastModifiedDate) {
|
if ($lastModifiedDate) {
|
||||||
$data['last-modified'] = $lastModifiedDate;
|
$data['last-modified'] = $lastModifiedDate;
|
||||||
|
|
Loading…
Reference in New Issue