PHPackages                             laudis/graphaware-neo4j-bolt-legacy - 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. laudis/graphaware-neo4j-bolt-legacy

ActiveLibrary[Database &amp; ORM](/categories/database)

laudis/graphaware-neo4j-bolt-legacy
===================================

Neo4j Bolt Binary Protocol PHP Driver

5.1.0(4y ago)0141MITPHPPHP ^7.0 || ^8.0

Since Dec 29Pushed 4y agoCompare

[ Source](https://github.com/transistive/neo4j-bolt-php)[ Packagist](https://packagist.org/packages/laudis/graphaware-neo4j-bolt-legacy)[ RSS](/packages/laudis-graphaware-neo4j-bolt-legacy/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (56)Used By (1)

Neo4j Bolt PHP
--------------

[](#neo4j-bolt-php)

⚠️ Warning ⚠️
-------------

[](#️-warning-️)

This is a legacy api. This project exists to ️allow people to quickly get up and running with newer versions of neo4j in existing projects. For the newest drivers and latest features, please visit the [neo4j php client](https://github.com/neo4j-php/neo4j-php-client) on the [neo4j-php](https://github.com/neo4j-php) github page. There is also a lower level driver available under the name [Bolt](https://github.com/neo4j-php/Bolt)

### Requirements:

[](#requirements)

- PHP ^7.0 || ^8.0
- Neo4j ^3.0 || ^4.0
- `sockets` extension
- `bcmath` extension
- `mbstring` extension

### Installation

[](#installation)

Require the package in your dependencies :

```
composer require laudis/graphaware-neo4j-bolt-legacy
```

### Setting up a driver and creating a session

[](#setting-up-a-driver-and-creating-a-session)

```
use GraphAware\Bolt\GraphDatabase;

$driver = GraphDatabase::driver("bolt://localhost");
$session = $driver->session();
```

### Sending a Cypher statement

[](#sending-a-cypher-statement)

```
$session = $driver->session();
$session->run("CREATE (n)");
$session->close();

// with parameters :

$session->run("CREATE (n) SET n += {props}", ['name' => 'Mike', 'age' => 27]);
```

### Empty Arrays

[](#empty-arrays)

Due to lack of Collections types in php, there is no way to distinguish when an empty array should be treated as equivalent Java List or Map types.

Therefore you can use a wrapper around arrays for type safety :

```
use GraphAware\Common\Collections;

        $query = 'MERGE (n:User {id: {id} })
        WITH n
        UNWIND {friends} AS friend
        MERGE (f:User {id: friend.name})
        MERGE (f)-[:KNOWS]->(n)';

        $params = ['id' => 'me', 'friends' => Collections::asList([])];
        $this->getSession()->run($query, $params);

// Or

        $query = 'MERGE (n:User {id: {id} })
        WITH n
        UNWIND {friends}.users AS friend
        MERGE (f:User {id: friend.name})
        MERGE (f)-[:KNOWS]->(n)';

        $params = ['id' => 'me', 'friends' => Collections::asMap([])];
        $this->getSession()->run($query, $params);
```

### TLS Encryption

[](#tls-encryption)

In order to enable TLS support, you need to set the configuration option to `REQUIRED`, here an example :

```
$config = \GraphAware\Bolt\Configuration::newInstance()
    ->withCredentials('bolttest', 'L7n7SfTSj0e6U')
    ->withTLSMode(\GraphAware\Bolt\Configuration::TLSMODE_REQUIRED);

$driver = \GraphAware\Bolt\GraphDatabase::driver('bolt://hobomjfhocgbkeenl.dbs.graphenedb.com:24786', $config);
$session = $driver->session();
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

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 ~44 days

Recently: every ~363 days

Total

46

Last Release

1809d ago

Major Versions

1.5.6 → 55.x-dev2016-05-24

1.11.0 → 2.0.02021-05-26

2.1.0 → 5.1.02021-05-30

PHP version history (4 changes)1.4.1PHP &gt;= 5.6

55.x-devPHP &gt;= 5.5

2.0.0PHP ^7.0

2.1.0PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cb8ab20866bd4fb9928742bc2321fcfe89d5e8560d4abfdd52ba139072b487b?d=identicon)[transitive](/maintainers/transitive)

---

Top Contributors

[![ikwattro](https://avatars.githubusercontent.com/u/1222009?v=4)](https://github.com/ikwattro "ikwattro (183 commits)")[![transistive](https://avatars.githubusercontent.com/u/16435930?v=4)](https://github.com/transistive "transistive (13 commits)")[![xavismeh](https://avatars.githubusercontent.com/u/181753?v=4)](https://github.com/xavismeh "xavismeh (13 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (9 commits)")[![jerairrest](https://avatars.githubusercontent.com/u/1588969?v=4)](https://github.com/jerairrest "jerairrest (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laudis-graphaware-neo4j-bolt-legacy/health.svg)

```
[![Health](https://phpackages.com/badges/laudis-graphaware-neo4j-bolt-legacy/health.svg)](https://phpackages.com/packages/laudis-graphaware-neo4j-bolt-legacy)
```

###  Alternatives

[a2lix/translation-form-bundle

Translate your doctrine objects easily with some helpers

3376.9M38](/packages/a2lix-translation-form-bundle)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[damienharper/auditor

The missing audit log library.

1922.8M8](/packages/damienharper-auditor)[guikingone/scheduler-bundle

A Symfony bundle that allows to schedule and create repetitive tasks

114217.4k](/packages/guikingone-scheduler-bundle)[plumtreesystems/neo4j-bolt

Neo4j Bolt Binary Protocol PHP Driver

1175.3k3](/packages/plumtreesystems-neo4j-bolt)[bartlett/php-compatinfo-db

Reference Database of all functions, constants, classes, interfaces on PHP standard distribution and about 110 extensions

1183.0k1](/packages/bartlett-php-compatinfo-db)

PHPackages © 2026

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