function DrupalDevDependenciesBuilder::getPackage

Same name in other branches
  1. 9 composer/Generator/Builder/DrupalDevDependenciesBuilder.php \Drupal\Composer\Generator\Builder\DrupalDevDependenciesBuilder::getPackage()
  2. 8.9.x composer/Generator/Builder/DrupalDevDependenciesBuilder.php \Drupal\Composer\Generator\Builder\DrupalDevDependenciesBuilder::getPackage()
  3. 10 composer/Generator/Builder/DrupalDevDependenciesBuilder.php \Drupal\Composer\Generator\Builder\DrupalDevDependenciesBuilder::getPackage()

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;
}

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