You are here

protected function ExtraPackage::mergeSuggests in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php \Wikimedia\Composer\Merge\ExtraPackage::mergeSuggests()

Merge suggested packages into a RootPackageInterface

Parameters

RootPackageInterface $root:

1 call to ExtraPackage::mergeSuggests()
ExtraPackage::mergeInto in vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php
Merge this package into a RootPackageInterface

File

vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php, line 371

Class

ExtraPackage
Processing for a composer.json file that will be merged into a RootPackageInterface

Namespace

Wikimedia\Composer\Merge

Code

protected function mergeSuggests(RootPackageInterface $root) {
  $suggests = $this->package
    ->getSuggests();
  if (!empty($suggests)) {
    $unwrapped = self::unwrapIfNeeded($root, 'setSuggests');
    $unwrapped
      ->setSuggests(array_merge($root
      ->getSuggests(), $suggests));
  }
}