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

ActiveLibrary

gino-pane/neo4j-bolt
====================

Neo4j Bolt Binary Protocol PHP Driver

1.12.4(4y ago)015MITPHPPHP ^7.1|^8.0

Since Dec 29Pushed 4y agoCompare

[ Source](https://github.com/AutoProtect-Group/neo4j-bolt-php)[ Packagist](https://packagist.org/packages/gino-pane/neo4j-bolt)[ RSS](/packages/gino-pane-neo4j-bolt/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (6)Versions (60)Used By (0)

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

[](#neo4j-bolt-php)

PHP low level Driver for Neo4j's Bolt Remoting Protocol

[![Build Status](https://camo.githubusercontent.com/bc84732a5b185860b4e82a4a6095997953f09be1daf4e2e3ff91d54b7cf7551a/68747470733a2f2f7472617669732d63692e6f72672f6175746f70726f746563742d67726f75702f6e656f346a2d626f6c742d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/autoprotect-group/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)

- PHP7.1+
- Neo4j3.0
- PHP Sockets extension available
- `bcmath` extension
- `mbstring` extension

### Installation

[](#installation)

Require the package in your dependencies :

```
composer require autoprotect-group/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

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 82.8% 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 ~42 days

Recently: every ~87 days

Total

48

Last Release

1797d ago

Major Versions

1.5.6 → 55.x-dev2016-05-24

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

55.x-devPHP &gt;= 5.5

1.12.0PHP ^7.1

1.12.3PHP ^7.1|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/13784bcc3c69ea265648475d67e70d2fdb427207ba73f140ff29b1ff00e3e3ef?d=identicon)[GinoPane](/maintainers/GinoPane)

---

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)")[![GinoPane](https://avatars.githubusercontent.com/u/3897579?v=4)](https://github.com/GinoPane "GinoPane (7 commits)")[![mnarushevich](https://avatars.githubusercontent.com/u/20266553?v=4)](https://github.com/mnarushevich "mnarushevich (1 commits)")[![gep](https://avatars.githubusercontent.com/u/223114?v=4)](https://github.com/gep "gep (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/framework-bundle

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

3.6k235.4M9.7k](/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)[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.7k136](/packages/symfony-ai-platform)[oxid-esales/graphql-base

OXID eSales GraphQL base module

24101.0k10](/packages/oxid-esales-graphql-base)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)

PHPackages © 2026

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