DependencyInjection/Neo4jExtension.php
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.xml');

        $this->handleConnections($config, $container);
        $clientServiceIds = $this->handleClients($config, $container);

        if ($this->validateEntityManagers($config)) {
            $loader->load('entity_manager.xml');
            $this->handleEntityManagers($config, $container, $clientServiceIds);
            $container->setAlias('neo4j.entity_manager', 'neo4j.entity_manager.default');
            $container->setAlias(EntityManagerInterface::class, 'neo4j.entity_manager.default');
        }

        // add aliases for the default services
        $container->setAlias('neo4j.connection', 'neo4j.connection.default');
        $container->setAlias(Connection::class, 'neo4j.connection.default');
        $container->setAlias('neo4j.client', 'neo4j.client.default');
        $container->setAlias(ClientInterface::class, 'neo4j.client.default');

        // Configure toolbar
        if ($this->isConfigEnabled($container, $config['profiling'])) {
            $loader->load('data-collector.xml');
        }
    }
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.xml');

        $this->handleConnections($config, $container);
        $clientServiceIds = $this->handleClients($config, $container);

        if ($this->validateEntityManagers($config)) {
            $loader->load('entity_manager.xml');
            $this->handleEntityManagers($config, $container, $clientServiceIds);
            $container->setAlias('neo4j.entity_manager', 'neo4j.entity_manager.default');
            $container->setAlias(EntityManagerInterface::class, 'neo4j.entity_manager.default');
        }

        // add aliases for the default services
        $container->setAlias('neo4j.connection', 'neo4j.connection.default');
        $container->setAlias(Connection::class, 'neo4j.connection.default');
        $container->setAlias('neo4j.client', 'neo4j.client.default');
        $container->setAlias(ClientInterface::class, 'neo4j.client.default');

        // Configure toolbar
        if ($this->isConfigEnabled($container, $config['profiling'])) {
            $loader->load('data-collector.xml');
        }
    }
{@inheritdoc}