Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonConfigSource.php

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\Config

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal