1
0
Fork 0

Allow v2 metadata target to provide security advisories without releases. (#11257)

pull/11271/head
Conrad Lara 2023-01-13 13:20:03 -08:00 committed by GitHub
parent 70b1863480
commit c7f32820d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1017,7 +1017,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$promises[] = $this->startCachedAsyncDownload($name, $realName)
->then(function (array $spec) use (&$packages, &$namesFound, $realName, $constraint, $acceptableStabilities, $stabilityFlags, $alreadyLoaded): void {
[$response, $packagesSource] = $spec;
if (null === $response) {
if (null === $response || !isset($response['packages'][$realName])) {
return;
}
@ -1092,7 +1092,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$response = $contents;
}
if (!isset($response['packages'][$packageName])) {
if (!isset($response['packages'][$packageName]) && !isset($response['security-advisories'])) {
return [null, $packagesSource];
}