1
0
Fork 0

Remove hack from ComposerRepository, fixes #9297

pull/10286/head
Jordi Boggiano 2021-11-13 13:25:25 +01:00
parent 65765a148a
commit 61b50cb7ec
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 0 additions and 6 deletions

View File

@ -967,12 +967,6 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$this->hasPartialPackages = !empty($data['packages']) && is_array($data['packages']);
}
// Horrible hack to workaround https://github.com/composer/composer/issues/9297 and bad mirrors, should be disabled if possible once they fix things
if (!empty($data['metadata-url']) && !empty($data['list']) && $data['metadata-url'] === '/p/%package%.json' && $data['list'] === 'https://packagist.org/packages/list.json') {
$this->io->writeError('<warning>Composer 2 repository support for '.$this->url.' has been disabled due to what seems like a misconfiguration. If this is a packagist.org mirror we recommend removing it as Composer 2 handles network operations much faster and should work fine without.</warning>');
unset($data['metadata-url']);
}
// metadata-url indicates V2 repo protocol so it takes over from all the V1 types
// V2 only has lazyProviders and possibly partial packages, but no ability to process anything else,
// V2 also supports async loading