From 611f9dcfe2cb90c6604bfd59203652a37e0d8288 Mon Sep 17 00:00:00 2001 From: Michal Gebauer Date: Thu, 3 Dec 2015 14:24:26 +0100 Subject: [PATCH] Reordered keys gitlab comes after github --- src/Composer/Config/JsonConfigSource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Config/JsonConfigSource.php b/src/Composer/Config/JsonConfigSource.php index 160dd393c..5df29f032 100644 --- a/src/Composer/Config/JsonConfigSource.php +++ b/src/Composer/Config/JsonConfigSource.php @@ -79,7 +79,7 @@ class JsonConfigSource implements ConfigSourceInterface public function addConfigSetting($name, $value) { $this->manipulateJson('addConfigSetting', $name, $value, function (&$config, $key, $val) { - if (preg_match('{^(gitlab-oauth|github-oauth|http-basic|platform)\.}', $key)) { + if (preg_match('{^(github-oauth|gitlab-oauth|http-basic|platform)\.}', $key)) { list($key, $host) = explode('.', $key, 2); if ($this->authConfig) { $config[$key][$host] = $val; @@ -98,7 +98,7 @@ class JsonConfigSource implements ConfigSourceInterface public function removeConfigSetting($name) { $this->manipulateJson('removeConfigSetting', $name, function (&$config, $key) { - if (preg_match('{^(gitlab-oauth|github-oauth|http-basic|platform)\.}', $key)) { + if (preg_match('{^(github-oauth|gitlab-oauth|http-basic|platform)\.}', $key)) { list($key, $host) = explode('.', $key, 2); if ($this->authConfig) { unset($config[$key][$host]);