DependencyInjection/Neo4jExtension.php
private function handleClients(array &$config, ContainerBuilder $container): array
    {
        if (empty($config['clients'])) {
            // Add default entity manager if none set.
            $config['clients']['default'] = ['connections' => ['default']];
        }

        $serviceIds = [];
        foreach ($config['clients'] as $name => $data) {
            $connections = [];
            $serviceIds[$name] = $serviceId = sprintf('neo4j.client.%s', $name);
            foreach ($data['connections'] as $connectionName) {
                if (empty($config['connections'][$connectionName])) {
                    throw new InvalidConfigurationException(sprintf(
                        'Client "%s" is configured to use connection named "%s" but there is no such connection',
                        $name,
                        $connectionName
                    ));
                }
                $connections[] = $connectionName;
            }
            if (empty($connections)) {
                $connections[] = 'default';
            }

            $definition = class_exists(ChildDefinition::class)
                ? new ChildDefinition('neo4j.client.abstract')
                : new DefinitionDecorator('neo4j.client.abstract');

            $container
                ->setDefinition($serviceId, $definition)
                ->setArguments([$connections]);
        }

        return $serviceIds;
    }
private function handleClients(array &$config, ContainerBuilder $container): array
    {
        if (empty($config['clients'])) {
            // Add default entity manager if none set.
            $config['clients']['default'] = ['connections' => ['default']];
        }

        $serviceIds = [];
        foreach ($config['clients'] as $name => $data) {
            $connections = [];
            $serviceIds[$name] = $serviceId = sprintf('neo4j.client.%s', $name);
            foreach ($data['connections'] as $connectionName) {
                if (empty($config['connections'][$connectionName])) {
                    throw new InvalidConfigurationException(sprintf(
                        'Client "%s" is configured to use connection named "%s" but there is no such connection',
                        $name,
                        $connectionName
                    ));
                }
                $connections[] = $connectionName;
            }
            if (empty($connections)) {
                $connections[] = 'default';
            }

            $definition = class_exists(ChildDefinition::class)
                ? new ChildDefinition('neo4j.client.abstract')
                : new DefinitionDecorator('neo4j.client.abstract');

            $container
                ->setDefinition($serviceId, $definition)
                ->setArguments([$connections]);
        }

        return $serviceIds;
    }
@param array            $config
@param ContainerBuilder $container

@return array with service ids