function DrupalCoreComposer::getRequireDev

Same name in other branches
  1. 9 composer/Generator/Util/DrupalCoreComposer.php \Drupal\Composer\Generator\Util\DrupalCoreComposer::getRequireDev()
  2. 10 composer/Generator/Util/DrupalCoreComposer.php \Drupal\Composer\Generator\Util\DrupalCoreComposer::getRequireDev()
  3. 11.x 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 isset($composerJsonData['require-dev']) ? $composerJsonData['require-dev'] : [];
}

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