neo4j-contrib/neo4j-symfony

Name: neo4j-symfony

Owner: Neo4j Contrib

Description: Symfony Bundle for the Neo4j Graph Database

Created: 2016-12-07 10:46:08.0

Updated: 2018-04-05 07:19:19.0

Pushed: 2018-03-06 15:48:39.0

Homepage: null

Size: 83

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Neo4j Symfony Bundle

Latest Version Build Status Code Coverage Quality Score Total Downloads

Install

Via Composer

mposer require neo4j/neo4j-bundle

If you want to use the an EntityManager you need to install a GraphAware OGM

mposer require graphaware/neo4j-php-ogm:@rc

Enable the bundle in your kernel:

p
pp/AppKernel.php

ic function registerBundles()

$bundles = array(
    // ...
    new Neo4j\Neo4jBundle\Neo4jBundle(),
);

Documentation

The bundle is a convenient way of registering services. We register Connections, Clients and EntityManagers. You will always have alias for the default services:

Minimal configuration
j:
nnections:
default: ~

With the minimal configuration we have services named:

Full configuration
j:
ofiling: 
enabled: true
nnections:
default:
  scheme: bolt # default (must be either "http" or "bolt")
  host: localhost # default
  port: 7474 # optional, will be set to the proper driver's default port if not provided
  username: neo4j # default
  password: neo4j # default
second_connection:
  username: foo
  password: bar
third_connection:
  dsn: 'bolt://foo:bar@localhost:7687'
ients:
default:
  connections: [default, second_connection, third_connection]
other_client:
  connections: [second_connection]
foobar: ~ # foobar client will have the "default" connection
tity_managers:
default: 
  client: other_client # defaults to "default"
  cache_dir: "%kernel.cache_dir%/neo4j" # defaults to system cache

With the configuration above we would have services named:

* Note: EntityManagers will only be available if graphaware/neo4j-php-ogm is installed.

Testing
mposer test
Example application

See an example application at https://github.com/neo4j-examples/movies-symfony-php-bolt

License

The MIT License (MIT). Please see License File for more information.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.