Browse Source

Fix regex, refs #6895

Jordi Boggiano 7 năm trước cách đây
mục cha
commit
4c8c574b6c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Composer/Repository/Vcs/GitLabDriver.php

+ 1 - 1
src/Composer/Repository/Vcs/GitLabDriver.php

@@ -71,7 +71,7 @@ class GitLabDriver extends VcsDriver
      */
     protected $portNumber;
 
-    const URL_REGEX = '#^(?:(?P<scheme>https?)://(?P<domain>.+?)\:?(?P<port>[0-9]+)?/|git@(?P<domain2>[^:]+):)(?P<parts>.+)/(?P<repo>[^/]+?)(?:\.git|/)?$#';
+    const URL_REGEX = '#^(?:(?P<scheme>https?)://(?P<domain>.+?)(?::(?P<port>[0-9]+))?/|git@(?P<domain2>[^:]+):)(?P<parts>.+)/(?P<repo>[^/]+?)(?:\.git|/)?$#';
 
     /**
      * Extracts information from the repository url.