From 4ce492d01d3e4c839d03a97319c5046077a4e7bf Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 6 May 2020 10:18:53 +0200 Subject: [PATCH] Fix detection of gitlab URLs, fixes #8402, closes #8868 --- src/Composer/Util/Git.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 27bfe766f..70f62bde2 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -165,7 +165,7 @@ class Git $errorMsg = $this->process->getErrorOutput(); } } elseif ( - preg_match('{^(git)@' . self::getGitLabDomainsRegex($this->config) . ':(.+?)\.git$}i', $url, $match) + preg_match('{^(git)@' . self::getGitLabDomainsRegex($this->config) . ':(.+?\.git)$}i', $url, $match) || preg_match('{^(https?)://' . self::getGitLabDomainsRegex($this->config) . '/(.*)}', $url, $match) ) { if ($match[1] === 'git') {