Skip to content

Commit c814ca0

Browse files
authored
Documentation Updates
* docs(readme): remove stale HTTP/HTTPS driver examples * docs(readme): address review — remove batching section and requirement footnotes
1 parent 8a76b7a commit c814ca0

1 file changed

Lines changed: 13 additions & 41 deletions

File tree

README.md

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- Designed, built and tested under close supervision with the official neo4j driver team
1515
- Validated with [testkit](https://github.com/neo4j-drivers/testkit)
1616
- Fully typed with [psalm](https://psalm.dev/)
17-
- Bolt, HTTP and auto routed drivers available
17+
- Bolt and Neo4j (auto-routed) drivers available
1818

1919
## See the driver in action
2020

@@ -48,13 +48,14 @@ use Laudis\Neo4j\ClientBuilder;
4848

4949
$client = ClientBuilder::create()
5050
->withDriver('bolt', 'bolt+s://user:password@localhost') // creates a bolt driver
51-
->withDriver('https', 'https://test.com', Authenticate::basic('user', 'password')) // creates an http driver
5251
->withDriver('neo4j', 'neo4j://neo4j.test.com?database=my-database', Authenticate::oidc('token')) // creates an auto routed driver with an OpenID Connect token
5352
->withDefaultDriver('bolt')
5453
->build();
5554
```
5655

57-
You have now created a client with **bolt, HTTPS and neo4j drivers**. The default driver that the client will use is **bolt**.
56+
You have now created a client with **bolt and neo4j drivers**. The default driver that the client will use is **bolt**.
57+
58+
> **Note:** The HTTP/HTTPS drivers were [removed in version 3.3.0](https://github.com/neo4j-php/neo4j-php-client/releases). Use **Bolt** (`bolt://`, `bolt+s://`, …) or **Neo4j** (`neo4j://`, …) URIs only.
5859
5960
Read more about the URLs and how to use them to configure drivers [here](#in-depth-configuration).
6061

@@ -102,19 +103,6 @@ $statement = new Statement('MERGE (user {email: $email})', ['email' => 'abc@hotm
102103
$client->runStatement($statement, 'default');
103104
```
104105

105-
#### Running multiple queries at once
106-
107-
The `runStatements` method will run all the statements at once. This method is an essential tool to reduce the number of database calls, especially when using the HTTP protocol.
108-
109-
```php
110-
use Laudis\Neo4j\Databags\Statement;
111-
112-
$results = $client->runStatements([
113-
Statement::create('MATCH (x) RETURN x LIMIT 100'),
114-
Statement::create('MERGE (x:Person {email: $email})', ['email' => 'abc@hotmail.com'])
115-
]);
116-
```
117-
118106
### Transaction functions
119107

120108
Transaction functions are the **de facto** standard when using the driver. It is the most portable as it is resistant to a lot of the pitfalls when first developing with high availability solutions such as [Neo4j aura](https://neo4j.com/blog/neo4j-aura-enterprise-ga-release/) or a [cluster](https://neo4j.com/docs/operations-manual/current/clustering/).
@@ -280,7 +268,6 @@ $client->run('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' => []
280268
|----------------------|----------------|
281269
| Authentication | Yes |
282270
| Transactions | Yes |
283-
| Http Protocol | Yes |
284271
| Bolt Protocol | Yes |
285272
| Cluster | Yes |
286273
| Aura | Yes |
@@ -291,26 +278,13 @@ $client->run('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' => []
291278

292279
* PHP >= 7.4
293280
* A Neo4j database (minimum version 3.5)
294-
* ext-bcmath *
295-
* ext-json **
296-
* ext-sockets ***
297-
298-
(*) Needed to implement the bolt protocol
299-
300-
(**) Needed to implement the http protocol
301-
302-
(***) Can be installed for optimal bolt protocol performance
303-
304-
305-
If you plan on using the HTTP drivers, make sure you have [psr-7](https://www.php-fig.org/psr/psr-7/), [psr-17](https://www.php-fig.org/psr/psr-17/) and [psr-18](https://www.php-fig.org/psr/psr-18/) implementations included into the project. If you don't have any, you can install them via composer:
306-
307-
```bash
308-
composer require nyholm/psr7 nyholm/psr7-server kriswallsmith/buzz
309-
```
281+
* ext-bcmath
282+
* ext-json
283+
* ext-sockets
310284

311285
## Result formats/hydration
312286

313-
In order to make the results of the bolt protocol and the http uniform, the driver provides and summarizes the results.
287+
In order to make the results of the Bolt protocol uniform, the driver provides and summarizes the results.
314288

315289
The default formatter is the `\Laudis\Neo4j\Formatters\SummarizedResultFormatter`, which is explained extensively in [the result format section](#accessing-the-results).
316290

@@ -424,13 +398,12 @@ bolt://localhost:7687?database=neo4j
424398

425399
#### Scheme configuration matrix
426400

427-
This library supports three drivers: bolt, HTTP and neo4j. The scheme part of the url determines the driver.
401+
This library supports two driver kinds: **bolt** (single server) and **neo4j** (client-side routing). The scheme part of the URL selects the driver.
428402

429-
| driver | scheme | valid certificate | self-signed certificate | function |
430-
|--------|--------|-------------------|----------------------------------------------|-------------------------------|
431-
| neo4j | neo4j | neo4j+s | neo4j+ssc | Client side routing over bolt |
432-
| bolt | bolt | bolt+s | bolt+ssc | Single server over bolt |
433-
| http | http | https | configured through PSR Client implementation | Single server over HTTP |
403+
| driver | scheme | valid certificate | self-signed certificate | function |
404+
|--------|--------|-------------------|-------------------------|-------------------------------|
405+
| neo4j | neo4j | neo4j+s | neo4j+ssc | Client-side routing over Bolt |
406+
| bolt | bolt | bolt+s | bolt+ssc | Single server over Bolt |
434407

435408
### Configuration objects
436409

@@ -439,7 +412,6 @@ A driver, session and transaction can be configured using configuration objects.
439412
| name | concept | description | class |
440413
|-------------------|-------------|----------------------------------------------------------------------------------|----------------------------|
441414
| user agent | driver | The user agent used to identify the client to the neo4j server. | `DriverConfiguration` |
442-
| Http PSR Bindings | driver | The relevant PSR implementation used by the driver when using the HTTP protocol. | `DriverConfiguration` |
443415
| database | session | The database to connect to. | `SessionConfiguration` |
444416
| fetch size | session | The amount of rows to fetch at once. | `SessionConfiguration` |
445417
| access mode | session | The default mode when accessing the server. | `SessionConfiguration` |

0 commit comments

Comments
 (0)