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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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(),
);
The bundle is a convenient way of registering services. We register Connections
,
Clients
and EntityManagers
. You will always have alias for the default services:
j:
nnections:
default: ~
With the minimal configuration we have services named:
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.
mposer test
See an example application at https://github.com/neo4j-examples/movies-symfony-php-bolt
The MIT License (MIT). Please see License File for more information.