You are here

public function DrupalDevDependenciesBuilder::getPackage in Drupal 8

Same name and namespace in other branches
  1. 9 composer/Generator/Builder/DrupalDevDependenciesBuilder.php \Drupal\Composer\Generator\Builder\DrupalDevDependenciesBuilder::getPackage()

Generate the Composer.json data for the current tag or branch.

Return value

array Composer json data.

Overrides BuilderInterface::getPackage

File

composer/Generator/Builder/DrupalDevDependenciesBuilder.php, line 20

Class

DrupalDevDependenciesBuilder
Builder to produce metapackage for drupal/core-dev.

Namespace

Drupal\Composer\Generator\Builder

Code

public function getPackage() {
  $composer = $this
    ->initialPackageMetadata();

  // Put everything from Drupal's "require-dev" into our "require" section.
  $composer['require'] = $this->drupalCoreInfo
    ->getRequireDev();

  // Sort our required packages by key.
  ksort($composer['require']);
  return $composer;
}