PHPackages                             misteio/neo4j-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. misteio/neo4j-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

misteio/neo4j-bundle
====================

Neo4j Bundle

0.1.3(8y ago)0856MITPHPPHP &gt;=7.0

Since Jun 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/misteio/Neo4jBundle)[ Packagist](https://packagist.org/packages/misteio/neo4j-bundle)[ Docs](https://github.com/Misteio/Neo4jBundle)[ RSS](/packages/misteio-neo4j-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (4)Used By (0)

Neo4jBundle
===========

[](#neo4jbundle)

[![Build Status](https://camo.githubusercontent.com/e2d2bdfbae038a5633c97c7c943edcf5f7b92a38f311482c01b6d286ed3518a3/68747470733a2f2f7472617669732d63692e6f72672f6d69737465696f2f4e656f346a42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/misteio/Neo4jBundle)[![Code Climate](https://camo.githubusercontent.com/dc11a6405879e822d7fdb559b77c72372955473ec7d7f3175ee9c224300f08bf/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d69737465696f2f4e656f346a42756e646c652f6261646765732f6770612e737667)](https://codeclimate.com/github/misteio/Neo4jBundle)[![Latest Stable Version](https://camo.githubusercontent.com/fe95a1381986b8d95e91cc20b43128c01b9afd407b97e28011d51591d4c043b7/68747470733a2f2f706f7365722e707567782e6f72672f6d69737465696f2f6e656f346a2d62756e646c652f762f737461626c65)](https://packagist.org/packages/misteio/neo4j-bundle)[![codecov](https://camo.githubusercontent.com/614ca92992f3889d327793521728a810313cb938d8bb63a0915bf7328d4b889c/68747470733a2f2f636f6465636f762e696f2f67682f4d69737465696f2f4e656f346a42756e646c652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/misteio/Neo4jBundle)

Neo4jBundle is a Symfony2/3 Bundle designed for simply use Neo4J 3.x with Doctrine 2.x

Installation
------------

[](#installation)

Via Composer

```
$ composer require misteio/neo4j-bundle
```

or in composer.json file

```
"misteio/neo4jbundle-bundle": "dev-master"
```

Register the bundle in `app/AppKernel.php`:

```
public function registerBundles()
{
    return array(
        // ...
        new Misteio\Neo4jBundle\MisteioNeo4jBundle(),
        // ...
    );
}
```

Configuration
-------------

[](#configuration)

Configure your connections and mappings in `app/config/config.yml` :

```
imports:
    - { resource: parameters.yml }

misteio_neo4j:
    connections:
      %neo4j.hosts%
    mappings:
      %neo4j.mappings%
```

An then create a file named parameters.yml in `app/config`

```
parameters:
    neo4j.hosts:
      graphenedb:
             host: 'yourHostWithoutScheme'
             port: yourPort
             user: username
             password: yourPassword

    neo4j.mappings:
      FakeEntity:
        class: '\Misteio\Neo4jBundle\Tests\Entity\FakeEntity'
        transformer: 'neo4j.fakeentity.transformer'
        auto_event: true
        connection: 'graphenedb'
        indexes:
          - 'name'
        # only available for neo4j 3.2 and above
        composite_indexes:
          - 'id,name'

```

Example of entity

```
