0

have just install Neo4j Client for PHP using 'composer require neoxygen/neoclient' and put this in my php file

require_once 'vendor/autoload.php';

use Neoxygen\NeoClient\ClientBuilder;

$client = ClientBuilder::create() ->addConnection('default','http','localhost',7474) ->build();

But when i run this php file in my browser when printr($client) it is not connected.

Christophe Willemsen
  • 19,399
  • 2
  • 29
  • 36
Abhishek
  • 1
  • 3

1 Answers1

0

As written in the very first lines of the github readme, this library has been ported to GraphAware. Secondly the version 4 is out since 2 weeks now.

Can you please upgrade your dependency to :

composer require graphaware/neo4j-php-client

Then install the dependencies :

composer install

Finally you can create the connection :

require_once 'vendor/autoload.php';

use GraphAware\Neo4j\Client\ClientBuilder;

$client = ClientBuilder::create()
    ->addConnection('default', 'http://neo4j:password@localhost:7474') // Example for HTTP connection configuration (port is optional)
    ->build();

I suggest you look at the complete README where all the documentation is :

https://github.com/graphaware/neo4j-php-client

Christophe Willemsen
  • 19,399
  • 2
  • 29
  • 36