function JsonConfigSource::removeConfigSetting
@inheritDoc
Overrides ConfigSourceInterface::removeConfigSetting
File
-
vendor/
composer/ composer/ src/ Composer/ Config/ JsonConfigSource.php, line 119
Class
- JsonConfigSource
- JSON Configuration Source
Namespace
Composer\ConfigCode
public function removeConfigSetting(string $name) : void {
$authConfig = $this->authConfig;
$this->manipulateJson('removeConfigSetting', static function (&$config, $key) use ($authConfig) : void {
if (Preg::isMatch('{^(bitbucket-oauth|github-oauth|gitlab-oauth|gitlab-token|bearer|http-basic|platform)\\.}', $key)) {
[
$key,
$host,
] = explode('.', $key, 2);
if ($authConfig) {
unset($config[$key][$host]);
}
else {
unset($config['config'][$key][$host]);
}
}
else {
unset($config['config'][$key]);
}
}, $name);
}