From c257395a6d4de581add275ec51a4f1c420c570a1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 31 May 2021 16:46:49 +0200 Subject: [PATCH] Add support for mirror-style placeholders for the dist url, fixes #9661 --- src/Composer/Package/Package.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Composer/Package/Package.php b/src/Composer/Package/Package.php index 9223fba93..a529e54ff 100644 --- a/src/Composer/Package/Package.php +++ b/src/Composer/Package/Package.php @@ -623,6 +623,11 @@ class Package extends BasePackage if (!$url) { return array(); } + + if ($urlType === 'dist' && false !== strpos($url, '%')) { + $url = ComposerMirror::processUrl($url, $this->name, $this->version, $ref, $type); + } + $urls = array($url); if ($mirrors) { foreach ($mirrors as $mirror) {