class Config (View source)

internal  
 

Determine configuration.

Default configuration is merged with the root package's extra:drupal-core-vendor-hardening configuration.

Properties

static protected array $defaultConfig

The default configuration which will always be merged with user config.

protected RootPackageInterface $rootPackage

The root package.

protected array $configData

Configuration gleaned from the root package.

Methods

__construct(RootPackageInterface $root_package)

Construct a Config object.

array[]
getAllCleanupPaths()

Gets the configured list of directories to remove from the root package.

string[]
getPathsForPackage(string $package)

Get a list of paths to remove for the given package.

Details

__construct(RootPackageInterface $root_package)

Construct a Config object.

Parameters

RootPackageInterface $root_package

Composer package object for the root package.

array[] getAllCleanupPaths()

Gets the configured list of directories to remove from the root package.

This is stored in composer.json extra:drupal-core-vendor-hardening.

Return Value

array[]

An array keyed by package name. Each array value is an array of paths, relative to the package.

string[] getPathsForPackage(string $package)

Get a list of paths to remove for the given package.

Parameters

string $package

The package name.

Return Value

string[]

Array of paths to remove, relative to the package.