cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

New neo4j PHP client and driver

Hello everyone,

I am the author of the neo4j PHP client library. We have recently released v2.0 which added lots of new features.

You can read about the client here: https://medium.com/neo4j/connect-to-neo4j-with-php-e10e24afedff or visit the repository here: https://github.com/neo4j-php/neo4j-php-client.

The client is inspired by the graphaware library which is deprecated. This client is built from the ground up and works with all versions of neo4j, cluster deployments and aura.

Any feedback or questions are welcome.

3 REPLIES 3

We are having a hard time understanding the connection syntax for aura (presumably via Bolt) Where does the aura Bolt URL, username, password get placed? Is it possible for you to provide a specific example? Thank you for taking the time to create and maintain the PHP client.

Hello @mzeinfeld ,

Your question has excellent timing. We are now finishing up a blog post about the subject.

In the meantime, I can give you an example:

You should have received credentials like this:
3X_f_9_f9591a90f32fccefbfdc7b65bb79e9109448f716.png

And should see something like this on the dashboard:

You can now simply create the client like this:

$client = ClientBuilder::create()
    ->withDriver(
        'aura',
        'neo4j+s://2c364be8.databases.neo4j.io',
        Authenticate::basic('neo4j', 'zFYIuuW8BBG4_GMJGlS7x384fO4vwjHFzYYHsJwFWNo')
    )
    ->build();

The first parameter of Clientbuilder::withDriver is the alias of the driver in case you have multiple drivers in the client. The second is the connection string and is of the form:
{scheme}://{uri}

You can read more about the uri here: GitHub - neo4j-php/neo4j-php-client: Php client for neo4j database

The final parameter is the authentication logic. In this case a simple username and password.

Good luck!

  • Ghlen

Perfect, works great. Thank you.