private function replaceResolveTargetClass(ContainerBuilder $container, $tagName, $serviceId, $class): void
    {
        $def = $container->getDefinition($serviceId);

        $this->replaceClassInArguments($container, $def, $class);
        $this->replaceClassInTags($def, $tagName, $class);
    }