1
0
Fork 0

Add support for mirror-style placeholders for the dist url, fixes #9661

pull/9925/head
Jordi Boggiano 2021-05-31 16:46:49 +02:00
parent c8de960018
commit c257395a6d
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 0 deletions

View File

@ -623,6 +623,11 @@ class Package extends BasePackage
if (!$url) { if (!$url) {
return array(); return array();
} }
if ($urlType === 'dist' && false !== strpos($url, '%')) {
$url = ComposerMirror::processUrl($url, $this->name, $this->version, $ref, $type);
}
$urls = array($url); $urls = array($url);
if ($mirrors) { if ($mirrors) {
foreach ($mirrors as $mirror) { foreach ($mirrors as $mirror) {