protected static function addPackage(array &$section, $package) {
    $versions = [
      'composer/installers' => '^1.4',
      'cweagans/composer-patches' => '^1.6',
      'drupal-composer/drupal-scaffold' => '^2.5',
      'drupal/console' => '^1.0',
      'drupal/core' => self::DRUPAL_DEFAULT_VERSION,
      'drupal/drupal-extension' => '^3.4',
      'drush/drush' => '^9.6',
      'oomphinc/composer-installers-extender' => '^1.1',
      'symfony/dotenv' => '^3.4',
      'webflo/drupal-core-require-dev' => self::DRUPAL_DEFAULT_VERSION,
      'webflo/drupal-core-strict' => self::DRUPAL_DEFAULT_VERSION,
      'wikimedia/composer-merge-plugin' => '^1.4',
      'zaporylie/composer-drupal-optimizations' => '^1.1',
    ];
    $section[$package] = $versions[$package];
  }
protected static function addPackage(array &$section, $package) {
    $versions = [
      'composer/installers' => '^1.4',
      'cweagans/composer-patches' => '^1.6',
      'drupal-composer/drupal-scaffold' => '^2.5',
      'drupal/console' => '^1.0',
      'drupal/core' => self::DRUPAL_DEFAULT_VERSION,
      'drupal/drupal-extension' => '^3.4',
      'drush/drush' => '^9.6',
      'oomphinc/composer-installers-extender' => '^1.1',
      'symfony/dotenv' => '^3.4',
      'webflo/drupal-core-require-dev' => self::DRUPAL_DEFAULT_VERSION,
      'webflo/drupal-core-strict' => self::DRUPAL_DEFAULT_VERSION,
      'wikimedia/composer-merge-plugin' => '^1.4',
      'zaporylie/composer-drupal-optimizations' => '^1.1',
    ];
    $section[$package] = $versions[$package];
  }
protected static function addPackage ( array & $ section , $ package ) { $ versions = [ 'composer/installers' => '^1.4' , 'cweagans/composer-patches' => '^1.6' , 'drupal-composer/drupal-scaffold' => '^2.5' , 'drupal/console' => '^1.0' , 'drupal/core' => self :: DRUPAL_DEFAULT_VERSION , 'drupal/drupal-extension' => '^3.4' , 'drush/drush' => '^9.6' , 'oomphinc/composer-installers-extender' => '^1.1' , 'symfony/dotenv' => '^3.4' , 'webflo/drupal-core-require-dev' => self :: DRUPAL_DEFAULT_VERSION , 'webflo/drupal-core-strict' => self :: DRUPAL_DEFAULT_VERSION , 'wikimedia/composer-merge-plugin' => '^1.4' , 'zaporylie/composer-drupal-optimizations' => '^1.1' , ] ; $ section [ $ package ] = $ versions [ $ package ] ; }
Requires a given package.

@param array $section
Section for the package (require|require-dev)
@param string $package
A package to be added.

@todo Find a way to track versions automatically.
Requires a given package .