protected function ExtraPackage::mergeRequires 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::mergeRequires()
Merge require or require-dev into a RootPackageInterface
Parameters
string $type 'require' or 'require-dev':
RootPackageInterface $root:
PluginState $state:
1 call to ExtraPackage::mergeRequires()
- 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 210
Class
- ExtraPackage
- Processing for a composer.json file that will be merged into a RootPackageInterface
Namespace
Wikimedia\Composer\MergeCode
protected function mergeRequires($type, RootPackageInterface $root, PluginState $state) {
$linkType = BasePackage::$supportedLinkTypes[$type];
$getter = 'get' . ucfirst($linkType['method']);
$setter = 'set' . ucfirst($linkType['method']);
$requires = $this->package
->{$getter}();
if (empty($requires)) {
return;
}
$this
->mergeStabilityFlags($root, $requires);
$requires = $this
->replaceSelfVersionDependencies($type, $requires, $root);
$root
->{$setter}($this
->mergeOrDefer($type, $root
->{$getter}(), $requires, $state));
}