Download the PHP package misteio/neo4j-bundle without Composer
On this page you can find all versions of the php package misteio/neo4j-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package neo4j-bundle
Neo4jBundle
Neo4jBundle is a Symfony2/3 Bundle designed for simply use Neo4J 3.x with Doctrine 2.x
Installation
Via Composer
or in composer.json file
Register the bundle in app/AppKernel.php
:
Configuration
Configure your connections and mappings in app/config/config.yml
:
An then create a file named parameters.yml in app/config
Example of entity
As you can see you have to create a Transformer for your Entities.
Usage
If auto_event is set, you have nothing to do for creation, update and deletion of your entities.
You can begin to call Neo4j with MisteioNeo4jHelper and Graphaware. Example in a Controller.
For more information about querying Neo4j, look at GraphAware Neo4j PHP Client
If auto_event is not set, you can listen misteio.neo4j.event
like this :
And in your EventListener Class
Command for populate
After configuration of your entities, you maybe want make them available on Neo4j. You have to use php app/console misteio:neo4j:populate
for Symfony 2 or php bin/console misteio:neo4j:populate
for Symfony 3. Differents options are availables :
- --limit=int : Limit of your collection
- --offset=int : Offset of your collection
- --type=string : Name of your Object (in our example it's YourEntityClassName)
- --threads=int : Number of threads you want to use for. If you use it, limit will not be available, and you have to set a batch.
- --reset : For delete all your Nodes. Can be passed with a type. If type is passed will deleted all node of entity chosen. BE CAREFULL, all your data will be lost in your Neo4j Cluster
- --reset_index : For reset your indexes. Must be passed with reset
- --batch=int : Length of collection per threads. Use this only with threads
Security
If you discover a security vulnerability , please email instead of using the issue tracker. All security vulnerabilities will be promptly addressed.
Standalone Test
How to test
- clone repo :
$ sudo git clone https://github.com/Misteio/Neo4jBundle.git
- go into directory :
$ cd Neo4jBundle/
- install composer as explained here : https://getcomposer.org/download/
- launch composer install :
$ ./composer.phar install
- launch test :
$ ./vendor/bin/phpunit
License
This Bundle is open-sourced software licensed under the MIT license
All versions of neo4j-bundle with dependencies
symfony/framework-bundle Version ~2.8|~3.0
symfony/console Version ~2.8|~3.0
symfony/finder Version ~2.8|~3.0
symfony/validator Version ~2.8|~3.0
symfony/process Version ~2.8|~3.0
graphaware/neo4j-php-client Version 4.8.1
doctrine/doctrine-bundle Version >=1.4
doctrine/orm Version >=2.4.8
doctrine/doctrine-fixtures-bundle Version >=2.3