From 05fcc4adfbbb46d3ffd644f887eb292ba2dbdab1 Mon Sep 17 00:00:00 2001 From: Robert Lu Date: Thu, 4 May 2017 16:47:16 +0800 Subject: [PATCH] can use relative path for mirror --- src/Composer/Repository/ComposerRepository.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 218e23992..d62deb7c1 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -497,7 +497,10 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito $this->sourceMirrors['hg'][] = array('url' => $mirror['hg-url'], 'preferred' => !empty($mirror['preferred'])); } if (!empty($mirror['dist-url'])) { - $this->distMirrors[] = array('url' => $mirror['dist-url'], 'preferred' => !empty($mirror['preferred'])); + $this->distMirrors[] = array( + 'url' => $this->canonicalizeUrl($mirror['dist-url']), + 'preferred' => !empty($mirror['preferred']) + ); } } }