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

Abandoned → [anyitsolutions/neo4j-bolt](/?search=anyitsolutions%2Fneo4j-bolt)Library[Database &amp; ORM](/categories/database)

anyitsolutions/neo4j-bolt
=========================

Neo4j Bolt Binary Protocol PHP Driver

1.12.0(5y ago)114.8k1MITPHPPHP &gt;= 5.6

Since Dec 29Pushed 5y agoCompare

[ Source](https://github.com/anyitsolutions/neo4j-bolt-php)[ Packagist](https://packagist.org/packages/anyitsolutions/neo4j-bolt)[ RSS](/packages/anyitsolutions-neo4j-bolt/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (6)Versions (54)Used By (1)

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

[](#neo4j-bolt-php)

PHP low level Driver for Neo4j's Bolt Remoting Protocol

[![Build Status](https://camo.githubusercontent.com/a932ffd669728cb5f1fec04cdda3c503c7c4e9591ba5ba5e08a15bc584382b0b/68747470733a2f2f7472617669732d63692e6f72672f677261706861776172652f6e656f346a2d626f6c742d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/graphaware/neo4j-bolt-php)

---

### References :

[](#references-)

- PHP Client embedding Bolt along with the http driver (recommended way of using Neo4j in PHP) :
- Neo4j 3.0 :

### Requirements:

[](#requirements)

- PHP5.6+
- Neo4j3.0
- PHP Sockets extension available
- `bcmath` extension
- `mbstring` extension

### Installation

[](#installation)

Require the package in your dependencies :

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

### 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();
```

### License

[](#license)

Copyright (c) 2015-2016 GraphAware Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 85.9% 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 ~39 days

Recently: every ~315 days

Total

44

Last Release

2098d ago

Major Versions

1.5.6 → 55.x-dev2016-05-24

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

55.x-devPHP &gt;= 5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/705dc7b0129bffd2fa54b1abce650e491ef3b079a7bd4e9c5bd9c2f4c5427f8c?d=identicon)[anyitsolutions](/maintainers/anyitsolutions)

---

Top Contributors

[![ikwattro](https://avatars.githubusercontent.com/u/1222009?v=4)](https://github.com/ikwattro "ikwattro (183 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)")[![anyitsolutions](https://avatars.githubusercontent.com/u/21997863?v=4)](https://github.com/anyitsolutions "anyitsolutions (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
