From ec63c213f8222c3c52e45f18773dd1f71f8bf2d8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 29 Nov 2017 10:33:44 +0100 Subject: [PATCH] Allow unsetting the whole platform config key --- src/Composer/Command/ConfigCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index eb7a3ff1f..6e457dd78 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -576,6 +576,9 @@ EOT return $this->configSource->addConfigSetting($settingKey, $values[0]); } + if ($settingKey === 'platform' && $input->getOption('unset')) { + return $this->configSource->removeConfigSetting($settingKey); + } // handle auth if (preg_match('/^(bitbucket-oauth|github-oauth|gitlab-oauth|gitlab-token|http-basic)\.(.+)/', $settingKey, $matches)) {