1
0
Fork 0

properly cache when a branch in a certain revision does not contain a composer.json

this prevents requesting/trying to get the composer.json over and over again even if no commits happend

Closes #7156
pull/7158/merge
Markus Staab 2018-03-05 09:34:40 +01:00 committed by Jordi Boggiano
parent 89e138a593
commit af3783b5f4
1 changed files with 10 additions and 1 deletions

View File

@ -133,7 +133,16 @@ class SvnDriver extends VcsDriver
return $this->infoCache[$identifier] = JsonFile::parseJson($res); return $this->infoCache[$identifier] = JsonFile::parseJson($res);
} }
try {
$composer = $this->getBaseComposerInformation($identifier); $composer = $this->getBaseComposerInformation($identifier);
} catch(TransportException $e) {
$message = $e->getMessage();
if (stripos($message, 'path not found') === false && stripos($message, 'svn: warning: W160013') === false) {
throw $e;
}
// remember a not-existent composer.json
$composer = '';
}
if ($this->shouldCache($identifier)) { if ($this->shouldCache($identifier)) {
$this->cache->write($identifier.'.json', json_encode($composer)); $this->cache->write($identifier.'.json', json_encode($composer));