You are here

public function DrupalCoreComposer::getRequireDev in Drupal 10

Same name and namespace in other branches
  1. 8 composer/Generator/Util/DrupalCoreComposer.php \Drupal\Composer\Generator\Util\DrupalCoreComposer::getRequireDev()
  2. 9 composer/Generator/Util/DrupalCoreComposer.php \Drupal\Composer\Generator\Util\DrupalCoreComposer::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).

Return value

array The contents of the "require-dev" section.

File

composer/Generator/Util/DrupalCoreComposer.php, line 84

Class

DrupalCoreComposer
Utilities for accessing composer.json data from drupal/drupal and drupal/core.

Namespace

Drupal\Composer\Generator\Util

Code

public function getRequireDev() {
  $composerJsonData = $this
    ->rootComposerJson();
  return $composerJsonData['require-dev'] ?? [];
}