protected function ExtraPackage::mergePackageLinks in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php \Wikimedia\Composer\Merge\ExtraPackage::mergePackageLinks()
Merge package links of the given type into a RootPackageInterface
Parameters
string $type 'conflict', 'replace' or 'provide':
RootPackageInterface $root:
1 call to ExtraPackage::mergePackageLinks()
- 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 344
Class
- ExtraPackage
- Processing for a composer.json file that will be merged into a RootPackageInterface
Namespace
Wikimedia\Composer\MergeCode
protected function mergePackageLinks($type, RootPackageInterface $root) {
$linkType = BasePackage::$supportedLinkTypes[$type];
$getter = 'get' . ucfirst($linkType['method']);
$setter = 'set' . ucfirst($linkType['method']);
$links = $this->package
->{$getter}();
if (!empty($links)) {
$unwrapped = self::unwrapIfNeeded($root, $setter);
if ($root !== $unwrapped) {
$this->logger
->warning('This Composer version does not support ' . "'{$type}' merging for aliased packages.");
}
$unwrapped
->{$setter}(array_merge($root
->{$getter}(), $this
->replaceSelfVersionDependencies($type, $links, $root)));
}
}