Skip to content

Commit 08ee9c9

Browse files
Update README
1 parent f39d8e0 commit 08ee9c9

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
# php-cypher-dsl
22

3-
The `php-cypher-dsl` library provides a way to construct advanced Cypher
4-
queries in an object-oriented and type-safe manner.
3+
The `php-cypher-dsl` library provides a way to construct Cypher queries in a type-safe manner.
54

65
## Documentation
76

8-
[The documentation can be found on the wiki
9-
here.](https://github.com/WikibaseSolutions/php-cypher-dsl/wiki)
7+
[The documentation can be found on the wiki here.](https://github.com/WikibaseSolutions/php-cypher-dsl/wiki)
108

119
## Installation
1210

1311
### Requirements
1412

15-
`php-cypher-dsl` requires PHP 7.4 or greater; using the latest version of PHP
16-
is highly recommended.
13+
`php-cypher-dsl` requires PHP 8.1 or greater; using the latest version of PHP is highly recommended.
1714

1815
### Installation through Composer
1916

20-
You can install `php-cypher-dsl` through composer by running the following
21-
command:
17+
You can install `php-cypher-dsl` through Composer by running the following command:
2218

2319
```
2420
composer require "wikibase-solutions/php-cypher-dsl"
@@ -30,8 +26,7 @@ Please refer to [CONTRIBUTING.md](https://github.com/neo4j-php/php-cypher-dsl/bl
3026

3127
## Example
3228

33-
To construct a query to find all of Tom Hanks' co-actors, you can use the
34-
following code:
29+
To construct a query to find all of Tom Hanks' co-actors, you can use the following code:
3530

3631
```php
3732
use function WikibaseSolutions\CypherDSL\node;
@@ -41,7 +36,13 @@ $tom = node("Person")->withProperties(["name" => "Tom Hanks"]);
4136
$coActors = node();
4237

4338
$statement = query()
44-
->match($tom->relationshipTo(Query::node(), "ACTED_IN")->relationshipFrom($coActors, "ACTED_IN"))
39+
->match($tom->relationshipTo(node(), "ACTED_IN")->relationshipFrom($coActors, "ACTED_IN"))
4540
->returning($coActors->property("name"))
4641
->build();
4742
```
43+
44+
This produces the following Cypher query (where `$1` is a random variable name):
45+
46+
```
47+
MATCH (:Person {name: 'Tom Hanks'})-[:ACTED_IN]->()<-[:ACTED_IN]-($1) RETURN $1.name
48+
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wikibase-solutions/php-cypher-dsl",
3-
"description": "A query builder for the Cypher query language written in PHP",
3+
"description": "A query builder for the Cypher query language",
44
"type": "library",
55
"keywords": [
66
"neo4j",

tests/end-to-end/ExamplesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
final class ExamplesTest extends TestCase
3434
{
35-
public function testReadmeExample(): void
35+
public function testOldReadmeExample(): void
3636
{
3737
$tom = node("Person")->withProperties(["name" => "Tom Hanks"]);
3838
$coActors = node();

0 commit comments

Comments
 (0)