Skip to content

fix: implement missing getServerInfo method in SymfonyDriver#100

Merged
transistive merged 1 commit intoneo4j-php:masterfrom
serhiilabs:fix/implement-getserverinfo-method
Jan 5, 2026
Merged

fix: implement missing getServerInfo method in SymfonyDriver#100
transistive merged 1 commit intoneo4j-php:masterfrom
serhiilabs:fix/implement-getserverinfo-method

Conversation

@serhiilabs
Copy link
Contributor

Fixes #99

Problem

SymfonyDriver implements DriverInterface but was missing the getServerInfo() method, causing:

Fatal Error: Class Neo4j\Neo4jBundle\Decorators\SymfonyDriver contains 1 abstract method
and must therefore be declared abstract or implement the remaining methods
(Laudis\Neo4j\Contracts\DriverInterface::getServerInfo)

This broke compatibility with laudis/neo4j-php-client 3.4.x which added this method to the interface.

Changes

  • Added getServerInfo() method that delegates to the underlying driver
  • Fixed verifyConnectivity() - it wasn't passing the $config parameter (same bug pattern)
  • Added unit tests for SymfonyDriver

Notes

The fix follows the existing decorator pattern used by other methods in this class. Both methods now correctly forward the optional SessionConfiguration parameter.

SymfonyDriver was missing the getServerInfo() method required by
DriverInterface, causing a fatal error when the class was loaded.

Also fixed verifyConnectivity() - it wasn't passing $config parameter
to the underlying driver.

Closes neo4j-php#99

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dazz
Copy link

dazz commented Jan 1, 2026

For everyone waiting this to get merged, it's working up to laudis/neo4j-php-client:3.4.0

@transistive
Copy link
Collaborator

Thank you, everyone, for the fix. We will create a new release today, along with the updated docs. Happy New Year!

@transistive transistive merged commit 9854637 into neo4j-php:master Jan 5, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

src/Decorators/SymfonyDriver.php does not implement getServerInfo

3 participants