protected function mergeExtra(RootPackageInterface $root, PluginState $state)
    {
        $extra = $this->getPackage()->getExtra();
        unset($extra['merge-plugin']);

        if ($state->shouldMergeExtra() && ! empty($extra)) {
            $unwrapped = static::unwrapIfNeeded($root, 'setExtra');
            $unwrapped->setExtra(
                $this->getExtra($unwrapped, $state, $extra)
            );
        }
    }