Skip to content

Multiple Neo4j Drivers Not Recognized Separately in Symfony Container Configuration #87

@AkshatSW

Description

@AkshatSW

Describe the Bug

In the config/packages/neo4j.yaml file, defining multiple drivers (e.g., local and aura) with different connection configurations results in only the default driver being recognized. Attempting to access multiple driver connections (such as for a local instance and Neo4j AuraDB) is not possible since only neo4j.driver is listed in the container instead of neo4j.driver.local and neo4j.driver.aura.

To Reproduce

Steps to reproduce the behavior:

  1. Define multiple drivers in neo4j.yaml:
    neo4j:
        drivers:
            local:
                dsn: '%env(resolve:NEO4J_LOCAL_DSN)%'
            aura:
                dsn: '%env(resolve:NEO4J_AURA_DSN)%'
  2. Run php bin/console debug:container | grep neo4j (or findstr neo4j on Windows).
  3. Open a transaction with a specified driver.
  4. Attempt to commit the transaction and notice only neo4j.driver appears in the container, rather than both neo4j.driver.local and neo4j.driver.aura.

Expected Behavior

The container should list each defined driver separately, such as:

  • neo4j.driver.local
  • neo4j.driver.aura

Screenshots

image
image

Desktop (please complete the following information):

  • Library Version: e.g., laudis/neo4j-php-client 3.1.3 , neo4j/neo4j-bundle 1.0.0
  • PHP Version: 8.3.12
  • OS: Windows 11

Additional Context

This issue impacts setups where multiple Neo4j connections are needed, as it restricts the ability to use separate connections in Symfony applications. No workaround has been identified yet.

@exaby73

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions