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

ActiveLibrary

oosor/neo4j-bolt
================

Neo4j Bolt Binary Protocol PHP Driver

10.0.1(4y ago)02471MITPHPPHP &gt;= 5.6

Since Dec 29Pushed 4y agoCompare

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

READMEChangelog (2)Dependencies (6)Versions (55)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

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 85.1% 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 ~46 days

Recently: every ~387 days

Total

45

Last Release

1731d ago

Major Versions

1.5.6 → 55.x-dev2016-05-24

1.11.0 → 10.0.02020-07-04

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

55.x-devPHP &gt;= 5.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9849117?v=4)[Andrew](/maintainers/oosor)[@oosor](https://github.com/oosor)

---

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)")[![oosor](https://avatars.githubusercontent.com/u/9849117?v=4)](https://github.com/oosor "oosor (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k235.4M9.6k](/packages/symfony-framework-bundle)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k134](/packages/symfony-ai-platform)[oxid-esales/graphql-base

OXID eSales GraphQL base module

24101.0k10](/packages/oxid-esales-graphql-base)

PHPackages © 2026

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