From 876f14341814d427e87dd358ed91ccc855678a5c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 18 Jan 2016 10:47:48 +0000 Subject: [PATCH] Forward repo options correctly to the RemoteFilesystem even if we get one injected, fixes #4786 --- src/Composer/Repository/ComposerRepository.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 548f06aed..de9567536 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -90,7 +90,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito $this->io = $io; $this->cache = new Cache($io, $config->get('cache-repo-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $this->url), 'a-z0-9.$'); $this->loader = new ArrayLoader(); - $this->rfs = $rfs ?: Factory::createRemoteFilesystem($this->io, $this->config, $this->options); + $this->rfs = $rfs ?: Factory::createRemoteFilesystem($this->io, $this->config); $this->eventDispatcher = $eventDispatcher; $this->repoConfig = $repoConfig; } @@ -190,7 +190,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito $url = str_replace('%query%', $query, $this->searchUrl); $hostname = parse_url($url, PHP_URL_HOST) ?: $url; - $json = $this->rfs->getContents($hostname, $url, false); + $json = $this->rfs->getContents($hostname, $url, false, $this->options); $results = JsonFile::parseJson($json, $url); return $results['results']; @@ -607,7 +607,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito } $hostname = parse_url($filename, PHP_URL_HOST) ?: $filename; - $json = $preFileDownloadEvent->getRemoteFilesystem()->getContents($hostname, $filename, false); + $json = $preFileDownloadEvent->getRemoteFilesystem()->getContents($hostname, $filename, false, $this->options); if ($sha256 && $sha256 !== hash('sha256', $json)) { if ($retries) { usleep(100000);