function ComposerPluginsValidator::__construct

File

core/modules/package_manager/src/Validator/ComposerPluginsValidator.php, line 98

Class

ComposerPluginsValidator
Validates the allowed Composer plugins, both in active and stage.

Namespace

Drupal\package_manager\Validator

Code

public function __construct(ConfigFactoryInterface $config_factory, ComposerInspector $inspector, PathLocator $pathLocator) {
    $settings = $config_factory->get('package_manager.settings');
    $this->additionalTrustedComposerPlugins = array_fill_keys(array_map([
        __CLASS__,
        'normalizePackageName',
    ], $settings->get('additional_trusted_composer_plugins')), '*');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.