Bolt protocol library over TCP socket. Bolt protocol is created and in use for communication with Neo4j Graph database. The Bolt documentation is available at https://7687.org/. This library is aimed to be low level and keep up with protocol messages architecture and specifications.
We are trying to keep up and this library supports Neo4j <= 4.4.
It's hard to live without all new features which means we keep at PHP >= 7.1.
You can use composer or download this repository.
composer require stefanak-michal/bolt
Concept of usage is based on Bolt messages and mostly you need just these.
<?php
$bolt = new \Bolt\Bolt(new \Bolt\connection\Socket());
$protocol = $bolt->build();
$protocol->hello(\Bolt\helpers\Auth::basic('neo4j', 'neo4j'));
$stats = $protocol->run('RETURN 1 AS num, 2 AS cnt');
$rows = $protocol->pull();