PHPackages                             neo4j/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. neo4j/neo4j-bundle

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

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

Symfony integration for Neo4j

1.3.2(7mo ago)8272.1k↓50%43[6 issues](https://github.com/neo4j-php/neo4j-symfony/issues)[5 PRs](https://github.com/neo4j-php/neo4j-symfony/pulls)MITPHPPHP &gt;=8.1CI passing

Since Dec 7Pushed 4mo ago14 watchersCompare

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

READMEChangelog (10)Dependencies (21)Versions (20)Used By (0)

Neo4j Symfony Bundle
====================

[](#neo4j-symfony-bundle)

[![Latest Version](https://camo.githubusercontent.com/b7b6bbf0cac4f84b5c2b34ac5551cbd0674de3476523991ba4a67a86fc6f488d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6e656f346a2d636f6e747269622f6e656f346a2d73796d666f6e792e7376673f7374796c653d666c61742d737175617265)](https://github.com/neo4j-contrib/neo4j-symfony/releases)[![Static Analysis](https://github.com/neo4j-php/neo4j-symfony/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/neo4j-php/neo4j-symfony/actions/workflows/static-analysis.yml)[![License](https://camo.githubusercontent.com/6fae6a6048966d014aa99890b3016f898be56ed12aef38233fc63fae711135c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e656f346a2d7068702f6e656f346a2d73796d666f6e79)](https://camo.githubusercontent.com/6fae6a6048966d014aa99890b3016f898be56ed12aef38233fc63fae711135c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e656f346a2d7068702f6e656f346a2d73796d666f6e79)[![Code Coverage](https://camo.githubusercontent.com/de00c9a86f5b2f7082af6635fb708200ef4002e9f68a199e233f0b70bb0f61e3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6e656f346a2d636f6e747269622f6e656f346a2d73796d666f6e792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/neo4j-contrib/neo4j-symfony)[![Quality Score](https://camo.githubusercontent.com/03c8a8e30e6e0b72eda4fd540eb9ed0f4a24925f277112789c3dc21c4104d312/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e656f346a2d636f6e747269622f6e656f346a2d73796d666f6e792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/neo4j-contrib/neo4j-symfony)[![Total Downloads](https://camo.githubusercontent.com/c5334a9ad67a6958f8cec087af0e0fd933c651539a145974c0648eb39363144d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e656f346a2f6e656f346a2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/neo4j/neo4j-bundle)

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

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

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    \Neo4j\Neo4jBundle\Neo4jBundle::class => ['all' => true],
];
```

Documentation
-------------

[](#documentation)

The bundle is a convenient way of registering services. We register `Drivers` and one `Clients`. You will always have alias for the default services:

- neo4j.driver
- neo4j.client

### Minimal configuration

[](#minimal-configuration)

```
neo4j:
  drivers:
    default: ~
```

With the minimal configuration we have services named:

- neo4j.driver.default
- neo4j.client

### Full configuration example

[](#full-configuration-example)

This example configures the client to contain two instances.

```
neo4j:
  profiling: true
  default_driver: high-availability
  drivers:
    - alias: high-availability
      dsn: 'neo4j://core1.mydomain.com:7687'
      authentication:
        type: 'oidc'
        token: '%neo4j.openconnect-id-token%'
      priority: 1
    # Overriding the alias makes it so that there is a backup server to use in case
    # the routing table cannot be fetched through the driver with a higher priority
    # but the same alias.
    # Once the table is fetched it will use that information to auto-route as usual.
    - alias: high-availability
      dsn: 'neo4j://core2.mydomain.com:7687'
      priority: 0
      authentication:
        type: 'oidc'
        token: '%neo4j.openconnect-id-token%'
    - alias: backup-instance
      dsn: 'bolt://localhost:7687'
      authentication:
        type: basic
        username: '%neo4j.backup-user%'
        password: '%neo4j.backup-pass%'
```

Testing
-------

[](#testing)

```
$ composer test
```

Example application
-------------------

[](#example-application)

See an example application at  (legacy project)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](../LICENSE) for more information.

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance70

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~230 days

Recently: every ~76 days

Total

15

Last Release

219d ago

Major Versions

0.4.2 → 1.0.0-rc12023-06-06

PHP version history (3 changes)0.1.0PHP ^7.0

1.0.0-rc1PHP &gt;=8.0

1.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ccc5eea13c60cf807ae982af00e368e2166e2f26d8eb541dcd881a57385bc?d=identicon)[Nyholm](/maintainers/Nyholm)

![](https://www.gravatar.com/avatar/701672c8bf64b9709195e49e819c040eb9584ab02d06be554772f6d709e2f5f3?d=identicon)[xavismeh](/maintainers/xavismeh)

![](https://www.gravatar.com/avatar/722d601a6351181dd1190308fa4f829604213dabb2fe51bfcfba3738759d3040?d=identicon)[neo4j](/maintainers/neo4j)

---

Top Contributors

[![transistive](https://avatars.githubusercontent.com/u/16435930?v=4)](https://github.com/transistive "transistive (81 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (62 commits)")[![exaby73](https://avatars.githubusercontent.com/u/50555895?v=4)](https://github.com/exaby73 "exaby73 (59 commits)")[![ikwattro](https://avatars.githubusercontent.com/u/1222009?v=4)](https://github.com/ikwattro "ikwattro (9 commits)")[![xavismeh](https://avatars.githubusercontent.com/u/181753?v=4)](https://github.com/xavismeh "xavismeh (4 commits)")[![spolischook](https://avatars.githubusercontent.com/u/1978331?v=4)](https://github.com/spolischook "spolischook (2 commits)")[![TNAJanssen](https://avatars.githubusercontent.com/u/2812277?v=4)](https://github.com/TNAJanssen "TNAJanssen (2 commits)")[![serhiilabs](https://avatars.githubusercontent.com/u/47003509?v=4)](https://github.com/serhiilabs "serhiilabs (1 commits)")[![theUm](https://avatars.githubusercontent.com/u/3176889?v=4)](https://github.com/theUm "theUm (1 commits)")[![james2001](https://avatars.githubusercontent.com/u/6031642?v=4)](https://github.com/james2001 "james2001 (1 commits)")[![aliel](https://avatars.githubusercontent.com/u/429453?v=4)](https://github.com/aliel "aliel (1 commits)")[![angelov](https://avatars.githubusercontent.com/u/138429?v=4)](https://github.com/angelov "angelov (1 commits)")[![cod3xa](https://avatars.githubusercontent.com/u/219617529?v=4)](https://github.com/cod3xa "cod3xa (1 commits)")[![diimpp](https://avatars.githubusercontent.com/u/870747?v=4)](https://github.com/diimpp "diimpp (1 commits)")[![FlorinMotoc](https://avatars.githubusercontent.com/u/10770978?v=4)](https://github.com/FlorinMotoc "FlorinMotoc (1 commits)")[![123kiran17](https://avatars.githubusercontent.com/u/76966686?v=4)](https://github.com/123kiran17 "123kiran17 (1 commits)")

---

Tags

bundlegraph-databaseneo4jphpsymfonysymfony-bundlesymfonybundledatabaseneo4jcyphergraph

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/neo4j-neo4j-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/neo4j-neo4j-bundle/health.svg)](https://phpackages.com/packages/neo4j-neo4j-bundle)
```

###  Alternatives

[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1534.7M2](/packages/kreait-firebase-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[onurb/doctrine-yuml-bundle

Symfony Bundle to visualize the mapping of your entities with Yuml

4198.6k](/packages/onurb-doctrine-yuml-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
