Skip to content

Commit 2c7ce6c

Browse files
committed
Merge remote-tracking branch 'origin/main' into invalidbookmarktest
2 parents 12ba09a + b200785 commit 2c7ce6c

File tree

2 files changed

+73
-54
lines changed

2 files changed

+73
-54
lines changed

Contributing.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Thank you for your interest in contributing to the Neo4j QueryAPI PHP Client! We
55
## Getting Started
66

77
1. **Fork the Repository**\
8-
Click the "Fork" button at the top right of the repository page.
8+
9+
10+
Click the "Fork" button at the top right of the repository page.
911

1012
2. **Clone Your Fork**
1113

@@ -15,23 +17,29 @@ Thank you for your interest in contributing to the Neo4j QueryAPI PHP Client! We
1517
```
1618

1719
3. **Set Up the Environment**
20+
1821

19-
- Ensure you have PHP installed (compatible with PHP < 7.1).
20-
- Install dependencies using Composer:
22+
23+
- Ensure you have PHP installed (compatible with PHP < 8.1).
24+
- Install dependencies using Composer:
2125

2226
```bash
23-
composer install
27+
composer install
2428
```
2529

26-
- Copy the `phpunit.dist.xml` file to `phpunit.xml` and configure the necessary environment variables like `NEO4J_ADDRESS`, `NEO4J_USERNAME`, `NEO4J_PASSWORD`.
27-
30+
- Copy the `phpunit.dist.xml` file to `phpunit.xml` and configure the necessary environment variables like `NEO4J_ADDRESS`, `NEO4J_USERNAME`, `NEO4J_PASSWORD`.
31+
32+
2833

2934

30-
4. **Run Tests**\
31-
Our tests use PHPUnit. To run tests:
35+
4. **Run Tests**
36+
37+
38+
- Ensure you have PHP installed (compatible with PHP < 8.1).
39+
- Install dependencies using Composer:
3240

3341
```bash
34-
composer/phpunit
42+
composer install
3543
```
3644

3745
## Code Guidelines

README.md

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,45 @@
1-
Neo4jQueryAPI client
1+
# Neo4j Query API client
22

3-
The Neo4j QueryAPI client is for developers and data engineers who want to interact programmatically with Neo4j databases — running queries, handling results, and managing database configurations. It offers:
3+
## Interact programmatically with Top Graph Technology
44

5-
- Easy configuration to pick and choose drivers
6-
- An intuitive API for smooth query execution
7-
- Extensibility for custom use cases
5+
- Easy to start with, just build your client in one line and start running queries
6+
- Use an intuitive API for smooth query execution
87
- Built and tested under close collaboration with the official Neo4j driver team
9-
- Easier to start with, just need a client to any neo4j instance
108
- Fully typed with Psalm and CS fixed for code quality
11-
- It does not supports Bolt, Rather compatible with HTTP, and auto-routed drivers
9+
- Uses HTTP under the hood instead of bolt
10+
- Small, lightweight, well maintained and fully tested codebase
1211

1312

13+
## Installation
1414

15-
# Query API
15+
You can install the package via Composer:
1616

17-
A PHP client for Neo4j, a graph database.
17+
```sh
18+
composer require neo4j-php/query-api
19+
```
1820

19-
## Installation
21+
## Client Installation
2022

21-
You can install the package via Composer:
23+
If you plan on using the HTTP drivers, make sure you have psr-7, psr-17, and psr-18 implementations included in your project.
24+
If you don't have any, you can install them via Composer:
2225

2326
```sh
24-
composer require this-repo/neo4j-client
27+
composer require psr/http-message psr/http-factory psr/http-client
2528
```
2629

30+
> **_NOTE:_** PSR-17 and PSR-18 are essential for HTTP client communication. Other compatible clients like Guzzle can also be used.
31+
> \* [PSR auto-discovery](https://docs.php-http.org/en/latest/discovery.html) will detect the installed HTTP client automatically.
32+
2733
## Usage
2834

2935
### Connecting to Neo4j
3036

37+
3138
```php
3239
use Neo4j\QueryAPI\Neo4jQueryAPI;
33-
use Neo4j\QueryAPI\Authentication\AuthenticateInterface;
40+
use Neo4j\QueryAPI\Objects\Authentication;
3441

35-
$client = Neo4jQueryAPI::login('http://localhost:7474', new AuthenticateInterface('username', 'password'));
42+
$client = Neo4jQueryAPI::login('http://localhost:7474', Authentication::basic('username', 'password'));
3643
```
3744

3845
### Running a Query
@@ -84,39 +91,43 @@ vendor/bin/phpunit
8491

8592
Cypher values and types map to these php types and classes:
8693

87-
| Cypher | PHP |
88-
|--------------------|:-----------------:|
89-
| Single name | |
90-
| Integer | ``` * int ``` |
91-
| Float | ``` * float ``` |
92-
| Boolean | ``` * bool ``` |
93-
| Null | ``` * null ``` |
94-
| String | ``` * string ``` |
95-
| Array | |
96-
| Date | |
97-
| Duration | |
98-
| 2D Point | |
99-
| 3D Point | |
100-
| Cartesian 2D Point | |
101-
| Cartesian 3D Point | |
102-
| Node | |
103-
| Path | |
104-
| Map | |
105-
| Exact name | |
106-
| Bookmarks | Yes |
94+
| Cypher | PHP |
95+
|--------------------|:---------------------------------------------------:|
96+
| List | ```* array``` |
97+
| Integer | ``` * int ``` |
98+
| Float | ``` * float ``` |
99+
| Boolean | ``` * bool ``` |
100+
| Null | ``` * null ``` |
101+
| String | ``` * string ``` |
102+
| Array | ```* array``` |
103+
| Local DateTime | ``` * string ``` (will be upgraded in version 1.1) |
104+
| Local Time | ``` * string ``` (will be upgraded in version 1.1) |
105+
| Zoned DateTime | ``` * string ``` (will be upgraded in version 1.1) |
106+
| Zoned Time | ``` * string ``` (will be upgraded in version 1.1) |
107+
| Duration | ``` * string ``` (will be upgraded in version 1.1) |
108+
| WGS 84 2D Point | `Neo4j\QueryAPI\Objects\Point` |
109+
| WGS 84 3D Point | `Neo4j\QueryAPI\Objects\Point` |
110+
| Cartesian 2D Point | `Neo4j\QueryAPI\Objects\Point` |
111+
| Cartesian 3D Point | `Neo4j\QueryAPI\Objects\Point` |
112+
| Map | ``` * array ``` |
113+
| Node | ```Neo4j\QueryAPI\Objects\Node ``` |
114+
| Relationship | ```Neo4j\QueryAPI\Objects\Relationship ``` |
115+
| Path | ```Neo4j\QueryAPI\Objects\Relationship``` |
107116

108117
## Diving deeper:
109118

110-
| Feature | Supported? |
111-
|----------|:-------------:|
112-
| Authentication | Yes |
113-
| Transaction | Yes |
114-
| HTTP | Yes |
115-
| Cluster | Yes |
116-
| Aura | Partly (recent versions) |
117-
| Bookmarks | Yes |
119+
| Feature | Supported? |
120+
|----------|:----------:|
121+
| Authentication | Yes |
122+
| Transaction | Yes |
123+
| HTTP | Yes |
124+
| Cluster | Partly* |
125+
| Aura | Yes |
126+
| Bookmarks | Yes |
127+
| Bolt | No |
118128

119-
> **_NOTE:_** It supports neo4j databases versions > 5.25 (which has QueryAPI enabled.)
129+
> **_NOTE:_** It supports neo4j databases versions > 5.25 or Neo4j Aura (which has QueryAPI enabled.)
130+
> \* Client side routing is only supported in the Neo4j driver
120131
121132

122133

@@ -130,8 +141,8 @@ If you discover any security-related issues, please email *[email protected]*
130141

131142
## Credits
132143

133-
- [Your Name](https://github.com/your-github-username)
134-
- [All Contributors](https://github.com/your-repo/neo4j-client/graphs/contributors)
144+
- Created with ❤️ by Nagels
145+
- [Ghlen Nagels](https://www.linkedin.com/in/ghlen/), [Kiran Chandani](https://www.linkedin.com/in/kiran-chandani-5628a1213/), [Pratiksha Zalte]()
135146

136147
## License
137148

0 commit comments

Comments
 (0)