1
0
Fork 0

Merge pull request #10002 from ondrejmirtes/patch-2

Simplify code
pull/10009/head
Jordi Boggiano 2021-07-15 14:49:00 +02:00 committed by GitHub
commit 052a455672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 16 deletions

View File

@ -566,7 +566,6 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
}
$packages = null;
if ($cacheKey) {
if (!$useLastModifiedCheck && $hash && $this->cache->sha256($cacheKey) === $hash) {
$packages = json_decode($this->cache->read($cacheKey), true);
$packagesSource = 'cached file ('.$cacheKey.' originating from '.Url::sanitize($url).')';
@ -584,7 +583,6 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
}
}
}
}
if (!$packages) {
try {