DrupalCoreComposer
class DrupalCoreComposer (View source)
Utilities for accessing composer.json data from drupal/drupal and drupal/core.
Some data is stored in the root composer.json file, while others is found in the core/composer.json file.
Properties
| protected array | $composerJson | Cached composer.json data. |
|
| protected array | $composerLock | Cached composer.lock data. |
Methods
DrupalCoreComposer constructor.
DrupalCoreComposer factory.
Fetch the composer data from the root drupal/drupal project.
Fetch the composer lock data.
Return the "require-dev" section from root or core composer.json file.
Look up the info for one package in the composer.lock file.
Load json data from the specified path.
Details
__construct(array $composerJson, array $composerLock)
DrupalCoreComposer constructor.
static DrupalCoreComposer
createFromPath(string $repositoryPath)
DrupalCoreComposer factory.
array
rootComposerJson()
Fetch the composer data from the root drupal/drupal project.
array
composerLock()
Fetch the composer lock data.
array
getRequireDev()
Return the "require-dev" section from root or core composer.json file.
The require-dev constraints moved from core/composer.json (8.7.x and earlier) to the root composer.json file (8.8.x and later).
array
packageLockInfo(string $packageName, bool $dev = FALSE)
Look up the info for one package in the composer.lock file.
static protected array
loadJsonFromPath(string $path)
Load json data from the specified path.