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.

Neo4j connect with PHP without framework


I see the driver need Symfony Framework Bundle, but I develop PHP application without Framework.
If I must install Symfony framework before using the driver of neo4j-php-client?

3 REPLIES 3

Hi, I don't think you need the Symfony framework for a simple php application. The only think you have to do is to add the library to your project using composer and then create the connection as explained in the README like the following:

<?php

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)
    ->addConnection('bolt', 'bolt://neo4j:password@localhost:7687') // Example for BOLT connection configuration (port is optional)
    ->build();

Let me know if you have any other questions. We are currently working in the integration with Drupal in this module https://www.drupal.org/project/neo4j

Good luck!

Thank you Ruben. I hope to learn how to CRUD neo4j with PHP no framework, can you provide a demo to me.Thank you very much.

This is an example of how to do it without any PHP framework but I don't think it's a good practice: https://github.com/graphaware/neo4j-php-ogm-tutorial

Have a look and let me know if you need any help.