protected function addResolvers(ContainerBuilder $container, string $service, string $tag)
    {
        if (!$container->has($service)) {
            return;
        }

        $definition = $container->getDefinition($service);
        $taggedServices = $container->findTaggedServiceIds($tag);

        foreach ($taggedServices as $id => $tags) {
            foreach ($tags as $attributes) {
                $definition->addMethodCall('addResolver', [
                    new Reference($id)
                ]);
            }
        }
    }