class PackageGenerator (View source)

Generates metapackages.

Properties

protected string $generatedProjectBaseDir

Base directory where generated projects are written.

Methods

__construct()

PackageGenerator constructor.

generate(IOInterface $io, string $base_dir)

Generate Drupal's metapackages whenever composer.lock is updated

builders()

Returns a list of metapackage builders.

bool
generateMetapackage(IOInterface $io, BuilderInterface $builder)

Generate one metapackage.

static string
encode(array $composer_json_data)

Utility function to encode metapackage json in a consistent way.

Details

__construct()

PackageGenerator constructor.

generate(IOInterface $io, string $base_dir)

Generate Drupal's metapackages whenever composer.lock is updated

Parameters

IOInterface $io

Composer IO object for interacting with the user.

string $base_dir

Directory where drupal/drupal repository is located.

protected BuilderInterface[] builders()

Returns a list of metapackage builders.

Return Value

BuilderInterface[]

protected bool generateMetapackage(IOInterface $io, BuilderInterface $builder)

Generate one metapackage.

Parameters

IOInterface $io

Composer IO object for interacting with the user.

BuilderInterface $builder

An object that can build a metapackage.

Return Value

bool

TRUE if the generated metapackage is different than what is on disk.

static string encode(array $composer_json_data)

Utility function to encode metapackage json in a consistent way.

Parameters

array $composer_json_data

Data to encode into a json string.

Return Value

string

Encoded version of provided json data.