From abd61369e42e2f2efc95d3e094e20d8060f2d90c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 4 Nov 2020 21:16:11 +0100 Subject: [PATCH] Revert "Support git@bitbucket.org URLs for git-bitbucket driver", fixes #9400 This reverts commit 985cef790f07c7b541badfcfd9913e6da7356244. --- src/Composer/Repository/Vcs/BitbucketDriver.php | 2 +- src/Composer/Repository/Vcs/GitBitbucketDriver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Repository/Vcs/BitbucketDriver.php b/src/Composer/Repository/Vcs/BitbucketDriver.php index b1f0c9db1..61dc37f8e 100644 --- a/src/Composer/Repository/Vcs/BitbucketDriver.php +++ b/src/Composer/Repository/Vcs/BitbucketDriver.php @@ -44,7 +44,7 @@ abstract class BitbucketDriver extends VcsDriver */ public function initialize() { - preg_match('#^(?:https?://bitbucket\.org/|git@bitbucket\.org:)([^/]+)/([^/]+?)(\.git|/?)$#i', $this->url, $match); + preg_match('#^https?://bitbucket\.org/([^/]+)/([^/]+?)(\.git|/?)$#i', $this->url, $match); $this->owner = $match[1]; $this->repository = $match[2]; $this->originUrl = 'bitbucket.org'; diff --git a/src/Composer/Repository/Vcs/GitBitbucketDriver.php b/src/Composer/Repository/Vcs/GitBitbucketDriver.php index a8d7bf1bc..08dbe9233 100644 --- a/src/Composer/Repository/Vcs/GitBitbucketDriver.php +++ b/src/Composer/Repository/Vcs/GitBitbucketDriver.php @@ -53,7 +53,7 @@ class GitBitbucketDriver extends BitbucketDriver */ public static function supports(IOInterface $io, Config $config, $url, $deep = false) { - if (!preg_match('#^(?:https?://bitbucket\.org/|git@bitbucket\.org:)([^/]+)/(.+?)\.git$#i', $url)) { + if (!preg_match('#^https?://bitbucket\.org/([^/]+)/(.+?)\.git$#i', $url)) { return false; }