Skip to content

Commit a798155

Browse files
committed
Fixed invalid alias when not using entity manager
1 parent a4967ad commit a798155

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DependencyInjection/Neo4jExtension.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@ public function load(array $configs, ContainerBuilder $container)
3535

3636
$this->handleConnections($config, $container);
3737
$clientServiceIds = $this->handleClients($config, $container);
38+
3839
if ($this->validateEntityManagers($config)) {
3940
$loader->load('entity_manager.xml');
4041
$this->handleEntityMangers($config, $container, $clientServiceIds);
42+
$container->setAlias('neo4j.entity_manager', 'neo4j.entity_manager.default');
4143
}
4244

4345
// add aliases for the default services
4446
$container->setAlias('neo4j.connection', 'neo4j.connection.default');
4547
$container->setAlias('neo4j.client', 'neo4j.client.default');
46-
$container->setAlias('neo4j.entity_manager', 'neo4j.entity_manager.default');
4748

4849
// Configure toolbar
4950
if ($this->isConfigEnabled($container, $config['profiling'])) {

0 commit comments

Comments
 (0)