src/DependencyInjection/Compiler/IndexPass.php
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('fos_elastica.index_manager')) {
            return;
        }

        $indexes = [];
        foreach ($container->findTaggedServiceIds('fos_elastica.index') as $id => $tags) {
            foreach ($tags as $tag) {
                $indexes[$tag['name']] = new Reference($id);
            }
        }

        $container->getDefinition('fos_elastica.index_manager')->replaceArgument(0, $indexes);
    }
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('fos_elastica.index_manager')) {
            return;
        }

        $indexes = [];
        foreach ($container->findTaggedServiceIds('fos_elastica.index') as $id => $tags) {
            foreach ($tags as $tag) {
                $indexes[$tag['name']] = new Reference($id);
            }
        }

        $container->getDefinition('fos_elastica.index_manager')->replaceArgument(0, $indexes);
    }
{@inheritdoc}