From 8c1f889806a9c4cdeb23ab8a5ec51fec465c265e Mon Sep 17 00:00:00 2001 From: Ruslan Bekenev Date: Mon, 19 Sep 2016 01:00:00 +0300 Subject: [PATCH] cut out "file://" from VCS download() method this issue was happening due to realpath() function that cannot work with "file://" path. For local repositories it is valid url but not valid for realpath() --- src/Composer/Downloader/VcsDownloader.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Composer/Downloader/VcsDownloader.php b/src/Composer/Downloader/VcsDownloader.php index e4fe312d7..8487fee25 100644 --- a/src/Composer/Downloader/VcsDownloader.php +++ b/src/Composer/Downloader/VcsDownloader.php @@ -67,6 +67,12 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa while ($url = array_shift($urls)) { try { if (Filesystem::isLocalPath($url)) { + # realpath() below will not understand + # url that starts with "file://" + $needle = 'file://'; + if (0 === strpos($url, $needle)) { + $url = substr($url, strlen($needle)); + } $url = realpath($url); } $this->doDownload($package, $path, $url);