DependencyInjection/CompilerPass/RemoveTaggedServiceCollectorCompilerPass.php
public function process(ContainerBuilder $container)
    {
        $disabledSerivcesAliases = $container->getParameter($this->disableParam);
        $taggedServices = $container->findTaggedServiceIds($this->tagName);

        foreach ($taggedServices as $id => $attributes) {
            if (isset($attributes[0][$this->aliasAttribute])
                    && in_array($attributes[0][$this->aliasAttribute], $disabledSerivcesAliases)) {
                if ($container->hasDefinition($id)) {
                    $container->removeDefinition($id);
                }
            }
        }
    }
public function process(ContainerBuilder $container)
    {
        $disabledSerivcesAliases = $container->getParameter($this->disableParam);
        $taggedServices = $container->findTaggedServiceIds($this->tagName);

        foreach ($taggedServices as $id => $attributes) {
            if (isset($attributes[0][$this->aliasAttribute])
                    && in_array($attributes[0][$this->aliasAttribute], $disabledSerivcesAliases)) {
                if ($container->hasDefinition($id)) {
                    $container->removeDefinition($id);
                }
            }
        }
    }
{@inheritdoc}