From 4c8c574b6c9f306eeb9201be10419b4616d3f198 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 17 Dec 2017 14:02:55 +0100 Subject: [PATCH] Fix regex, refs #6895 --- src/Composer/Repository/Vcs/GitLabDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/Vcs/GitLabDriver.php b/src/Composer/Repository/Vcs/GitLabDriver.php index c3c7000d6..fb2b7437e 100644 --- a/src/Composer/Repository/Vcs/GitLabDriver.php +++ b/src/Composer/Repository/Vcs/GitLabDriver.php @@ -71,7 +71,7 @@ class GitLabDriver extends VcsDriver */ protected $portNumber; - const URL_REGEX = '#^(?:(?Phttps?)://(?P.+?)\:?(?P[0-9]+)?/|git@(?P[^:]+):)(?P.+)/(?P[^/]+?)(?:\.git|/)?$#'; + const URL_REGEX = '#^(?:(?Phttps?)://(?P.+?)(?::(?P[0-9]+))?/|git@(?P[^:]+):)(?P.+)/(?P[^/]+?)(?:\.git|/)?$#'; /** * Extracts information from the repository url.