protected function mergeDevRequires(RootPackageInterface $root, PluginState $state)
    {
        if ( ! empty($requires = $this->getPackage()->getDevRequires())) {
            $this->mergeStabilityFlags($root, $requires);

            $duplicateLinks = [];
            $requires       = $this->replaceSelfVersionDependencies(
                'require-dev', $requires, $root
            );

            $root->setDevRequires($this->mergeLinks(
                $root->getDevRequires(), $requires, $state, $duplicateLinks
            ));

            $state->addDuplicateLinks('require-dev', $duplicateLinks);
        }
    }