Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
5f53d22
Merge branch 'main' into pratiksha
p123-stack Dec 16, 2024
cc44e63
Merge branch 'pratiksha' of https://github.com/nagels-tech/Neo4j-Clie…
p123-stack Dec 16, 2024
945e9f8
test code with parameters
p123-stack Dec 17, 2024
97b5c6c
added the neo4j exception implementation
p123-stack Dec 18, 2024
7226193
Exception testing code
p123-stack Dec 19, 2024
5a77694
Merge remote-tracking branch 'origin/main' into pratiksha
p123-stack Dec 19, 2024
21ec7b1
updated test
p123-stack Dec 20, 2024
0ca519a
added extra material for pratiksha to understand the query api use ca…
transistive Dec 27, 2024
b471ee2
transaction code
p123-stack Dec 27, 2024
e05524e
Transaction test case code
p123-stack Dec 30, 2024
6736b1f
Transaction query run returned in Resultset format
p123-stack Jan 2, 2025
d76b13e
Query Profile implementation script
p123-stack Jan 2, 2025
1e35cbb
Query Profile code
p123-stack Jan 3, 2025
e06d6cc
bookmarksandimpersonation
Jan 3, 2025
fdfa7a3
Merge remote-tracking branch 'origin/main' into workinprogress
123kiran17 Jan 6, 2025
ddf2b5c
Merge pull request #3 from nagels-tech/workinprogress
123kiran17 Jan 6, 2025
a52c960
wired up result counters
123kiran17 Jan 6, 2025
f7ea3d7
Merge pull request #4 from nagels-tech/create-result-counters-1951105551
transistive Jan 6, 2025
bb8b938
setup starting tests
transistive Jan 6, 2025
ab05311
temp
p123-stack Jan 6, 2025
19076c5
Merge remote-tracking branch 'origin/main' into create-transactions-1…
p123-stack Jan 6, 2025
c225228
Merge pull request #5 from nagels-tech/create-transactions-1951183165
transistive Jan 6, 2025
b11f0d2
initial setup for test
p123-stack Jan 6, 2025
d5585ac
Profilequery Plan test
p123-stack Jan 6, 2025
5657f19
Query Profile test
p123-stack Jan 7, 2025
7992fc3
test cases are fixed
123kiran17 Jan 8, 2025
36989cc
query profile test with different cypher queries
p123-stack Jan 9, 2025
740c9c8
Merge branch 'main' into create-bookmarks-1951107727
transistive Jan 10, 2025
78b7002
Merge pull request #7 from nagels-tech/create-bookmarks-1951107727
transistive Jan 10, 2025
1faa8da
Merge remote-tracking branch 'origin/main' into create-query-profile-…
transistive Jan 10, 2025
133adcd
Merge remote-tracking branch 'origin/main' into create-query-profile-…
transistive Jan 10, 2025
903e46f
Merge branch 'create-query-profile-1951106664' of github.com:nagels-t…
transistive Jan 10, 2025
45dbd7a
Merge pull request #6 from nagels-tech/create-query-profile-1951106664
transistive Jan 10, 2025
9bb05a2
wip
p123-stack Jan 10, 2025
76aabab
Merge remote-tracking branch 'origin' into create-query-profile-19511…
p123-stack Jan 10, 2025
c0fb334
winp
p123-stack Jan 10, 2025
8d688c8
winp
p123-stack Jan 13, 2025
9deb7ba
psalm applied
123kiran17 Jan 15, 2025
5feec76
worked on comments
123kiran17 Jan 15, 2025
7cde281
Merge remote-tracking branch 'origin/main' into psalm
123kiran17 Jan 15, 2025
ae0a6ca
winp
p123-stack Jan 15, 2025
2bf1796
winp
p123-stack Jan 16, 2025
82d17e6
transaction errors are solved
123kiran17 Jan 17, 2025
6a423d9
profiletestisremoved
123kiran17 Jan 17, 2025
8d3af70
Merge pull request #8 from nagels-tech/psalm
transistive Jan 17, 2025
441813b
Applied Php-cs-fixer
p123-stack Jan 17, 2025
9883c8c
Separated Cs-fixer workflow file
p123-stack Jan 17, 2025
00af5cb
updated testwithArray testcase
p123-stack Jan 17, 2025
9da379d
winp
p123-stack Jan 17, 2025
f11e4d4
winp
p123-stack Jan 17, 2025
a8b8c34
winp
p123-stack Jan 17, 2025
015d3f3
winp
p123-stack Jan 17, 2025
c33db7b
wp
p123-stack Jan 17, 2025
3f8cb9d
workinp
p123-stack Jan 17, 2025
331f748
wp
p123-stack Jan 17, 2025
32ad70e
work in progress
p123-stack Jan 17, 2025
2dab1fd
work
p123-stack Jan 17, 2025
a57cc92
DEBUG
p123-stack Jan 17, 2025
9270e6c
DEBUG
p123-stack Jan 17, 2025
6a446aa
DEBUG
p123-stack Jan 17, 2025
0ede745
DEBUG
p123-stack Jan 17, 2025
80bfdaf
DEBUG
p123-stack Jan 17, 2025
f2f710c
DEBUG
p123-stack Jan 17, 2025
1e301b7
DEBUG
p123-stack Jan 17, 2025
1648ab9
new commit
p123-stack Jan 17, 2025
6c0be6a
DEBUG
p123-stack Jan 17, 2025
0692965
DEBUG
p123-stack Jan 17, 2025
187c541
DEBUG
p123-stack Jan 17, 2025
ba8fdc8
DEBUG
p123-stack Jan 17, 2025
a7da290
DEBUG
p123-stack Jan 17, 2025
50a62bc
DEBUG
p123-stack Jan 17, 2025
282f3a4
DEBUG
p123-stack Jan 17, 2025
37ceb8c
DEBUG
p123-stack Jan 17, 2025
122a01c
test for Profile-query-plan working state
p123-stack Jan 20, 2025
303be57
Merge pull request #9 from nagels-tech/setup-phpcs-fixer-1954016256
transistive Jan 20, 2025
035a4ab
updated code
p123-stack Jan 20, 2025
b7603c8
resolved merge conflicts
p123-stack Jan 20, 2025
5bf14cb
Applied CS-fixer
p123-stack Jan 20, 2025
9195c5a
updated the test with identifiers parameter
p123-stack Jan 20, 2025
b615899
updated test with identifiers
p123-stack Jan 20, 2025
da0472d
Merge pull request #10 from nagels-tech/create-query-profile-1951106664
transistive Jan 21, 2025
096a6c0
modified Login logic (#12)
p123-stack Feb 10, 2025
45386e6
Implement request factory 1963795518 (#13)
p123-stack Feb 10, 2025
fba075f
Cleanup for excessive comments and unnecessary files (#17)
p123-stack Feb 10, 2025
e3674d3
winp
Feb 11, 2025
3819e23
winp
Feb 11, 2025
9cfa4f5
debug
Feb 11, 2025
e8da25c
DEBUG
Feb 11, 2025
b214ede
DEBUG
Feb 12, 2025
49299f8
DEBUG
Feb 12, 2025
bbef0cd
DEBUG
Feb 12, 2025
cee1887
DEBUG
Feb 12, 2025
1bd5f8e
DEBUG
Feb 12, 2025
1af67ba
DEBUG
Feb 12, 2025
8dbb650
enable workflows
Feb 12, 2025
d973060
winp
Feb 12, 2025
237f7df
Merge remote-tracking branch 'origin/main' into Psalm
Feb 12, 2025
7afaba9
Merge pull request #18 from nagels-tech/Psalm
p123-stack Feb 12, 2025
f356080
Response parser and Configuration Classes (#16)
123kiran17 Feb 12, 2025
80458a5
transaction object tests (#19)
p123-stack Feb 17, 2025
5bc2ad5
wip
123kiran17 Feb 17, 2025
5e00118
all the info errors were solved
123kiran17 Feb 18, 2025
6566b96
made a few changes for tests to run
123kiran17 Feb 19, 2025
94a342c
github-actions-pro-server-and-docker-container (#24)
p123-stack Feb 20, 2025
2d4da75
fixed all psalm issues
123kiran17 Feb 21, 2025
b8875f1
removed php cs fixer cache
123kiran17 Feb 21, 2025
483d53e
more quality of life upgrades
123kiran17 Feb 21, 2025
503c4d1
updated author
123kiran17 Feb 21, 2025
e00c9c1
fixed bootstrap import
123kiran17 Feb 21, 2025
f9b990c
Merge pull request #23 from nagels-tech/psalm-info-issues
123kiran17 Feb 21, 2025
5e7d697
add coverage to gitignore
123kiran17 Feb 21, 2025
75f84c8
psr factory detection (#25)
123kiran17 Feb 24, 2025
508554e
Configuration injection factory method (#28)
p123-stack Feb 24, 2025
61c9476
Create LICENSE
123kiran17 Feb 24, 2025
e31d22b
Integration test cleanup
123kiran17 Feb 27, 2025
5549d78
Merge remote-tracking branch 'origin/main'
123kiran17 Feb 28, 2025
3179ea9
invalidbooktest is created
123kiran17 Feb 28, 2025
13fc352
chore: remove invalid import
123kiran17 Feb 28, 2025
c0d5bd7
Merge branch 'main' into invalidbookmarktest
123kiran17 Feb 28, 2025
b200785
Proper readme with license mit (#31)
123kiran17 Feb 28, 2025
8d96f84
psalm info issues are fixed
123kiran17 Feb 28, 2025
12ba09a
fixed broken test and added schema for phpunit.xml
123kiran17 Feb 28, 2025
2c7ce6c
Merge remote-tracking branch 'origin/main' into invalidbookmarktest
123kiran17 Feb 28, 2025
dc88213
updated README.md
123kiran17 Feb 28, 2025
b48d977
minor errors
123kiran17 Feb 28, 2025
c3484e7
propertynotsetinconstructor is removed
123kiran17 Feb 28, 2025
d9a94f4
chore:psalm-issue
123kiran17 Feb 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Database Configuration
NEO4J_ADDRESS=https://6f72daa1.databases.neo4j.io/
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=O9lWmptqBgxBOz8NVcTJjgs3cHPyYmsy63ui6Spmw1d0
36 changes: 36 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Code Coverage

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2

Check warning on line 20 in .github/workflows/codecov.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/codecov.yml#L20

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
php-version: '8.1'

- name: Install dependencies
run: composer install

- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5

Check warning on line 31 in .github/workflows/codecov.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/codecov.yml#L31

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true
26 changes: 26 additions & 0 deletions .github/workflows/cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PHP CS Fixer

on:
push:
workflow_dispatch:

jobs:
php-cs-fixer:
name: PHP CS Fixer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2

Check warning on line 17 in .github/workflows/cs-fixer.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/cs-fixer.yml#L17

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
php-version: 8.1
tools: composer

- name: Install dependencies
run: composer install --no-progress --prefer-dist

- name: Run PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes
27 changes: 27 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Psalm Static Analysis

on:
push:
workflow_dispatch:

jobs:
psalm:
name: Run Psalm
runs-on: ubuntu-latest


steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2

Check warning on line 18 in .github/workflows/psalm.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/psalm.yml#L18

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
php-version: 8.1
tools: composer, psalm

- name: Install dependencies
run: composer install --no-progress --prefer-dist

- name: Run Psalm
run: vendor/bin/psalm --output-format=github
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: PHP Tests

on:
push:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
services:
neo4j:
image: neo4j:latest
ports:
- 7474:7474
- 7687:7687
env:
NEO4J_AUTH: neo4j/password
options: >-
--health-cmd "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1"
--health-interval 10s
--health-retries 5
--health-timeout 5s

name: Run PHPUnit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2

Check warning on line 34 in .github/workflows/test.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/test.yml#L34

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
php-version: 8.1
tools: composer, xdebug

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist

- name: Run Tests without phpunit.xml
env:
NEO4J_ADDRESS: "http://localhost:7474"
NEO4J_USERNAME: "neo4j"
NEO4J_PASSWORD: "password"
run: vendor/bin/phpunit --configuration phpunit.dist.xml
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml → .github/workflows/testaura.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
name: CI Pipeline
name: Test Neo4j Aura

on:
push:
branches:
- main
pull_request:
workflow_dispatch: # Allows manual trigger

concurrency:
group: ${{ github.ref }}
group: neo4j-aura-test-main
cancel-in-progress: true

jobs:
tests:
name: Run PHPUnit Tests
tests-aura:
name: Run PHPUnit Tests with Neo4j Aura
runs-on: ubuntu-latest


steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.1
tools: composer, xdebug

- name: Cache Composer dependencies
Expand All @@ -35,7 +36,9 @@ jobs:
- name: Install dependencies
run: composer install --no-progress --prefer-dist



- name: Run Tests without phpunit.xml
- name: Run Tests
env:
NEO4J_ADDRESS: ${{ secrets.NEO4J_ADDRESS }}
NEO4J_USERNAME: ${{ secrets.NEO4J_USERNAME }}
NEO4J_PASSWORD: ${{ secrets.NEO4J_PASSWORD }}
run: vendor/bin/phpunit --configuration phpunit.dist.xml
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@

#IDE
.idea/

#COMPOSER
vendor

#PHPUNIT
phpunit.xml
test
.phpunit.result.cache
.phpunit.result.cache

#PHP-CS-FIXER
.php-cs-fixer.php
.php-cs-fixer.cache


coverage

composer.lock
16 changes: 16 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

return (new Config())
->setRules([
'@PSR12' => true,
])
->setFinder(
Finder::create()
->in(__DIR__)
->exclude([
'vendor',
])
);
18 changes: 18 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

return (new Config())
->setRiskyAllowed(true) // Allow risky fixers
->setRules([
'@PSR12' => true,
'strict_param' => true, // This is a risky rule
])
->setFinder(
Finder::create()
->in(__DIR__)
->exclude([
'vendor',
])
);
102 changes: 102 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing to Neo4j QueryAPI he PHP Client

Thank you for your interest in contributing to the Neo4j QueryAPI PHP Client! We welcome all contributions, whether it's bug fixes, feature enhancements, or documentation improvements.

## Getting Started

1. **Fork the Repository**\


Click the "Fork" button at the top right of the repository page.

2. **Clone Your Fork**

```bash
git clone https://github.com/your-username/Neo4j-Client.git
cd Neo4j-Client
```

3. **Set Up the Environment**



- Ensure you have PHP installed (compatible with PHP < 8.1).
- Install dependencies using Composer:

```bash
composer install
```

- Copy the `phpunit.dist.xml` file to `phpunit.xml` and configure the necessary environment variables like `NEO4J_ADDRESS`, `NEO4J_USERNAME`, `NEO4J_PASSWORD`.




4. **Run Tests**


- Ensure you have PHP installed (compatible with PHP < 8.1).
- Install dependencies using Composer:

```bash
composer install
```

## Code Guidelines

- Ensure your code is **PSR-12 compliant**.
- Use **Psalm** for static analysis. Run:
```bash
composer psalm
```
- Apply **code style fixes** using:
```bash
composer cs:fix
```

## Making Changes

1. **Create a New Branch**\
Use a descriptive branch name:

```bash
git checkout -b fix/issue-123
```

2. **Make Your Edits**\
Ensure all tests pass and code is properly formatted.

3. **Commit Your Changes**\
Write clear commit messages:

```bash
git commit -m "Fix: Corrected query parsing for ProfiledQueryPlan"
```

4. **Push Your Branch**

```bash
git push origin fix/issue-123
```

## Submitting a Pull Request

1. Go to your forked repository on GitHub.
2. Click on the "New pull request" button.
3. Select your branch and submit the pull request.
4. Add a clear description of the changes you made.

## Review Process

- All PRs are reviewed by the maintainers.
- Ensure CI tests pass before requesting a review.
- Be open to feedback and make revisions as needed.

## Reporting Issues

If you spot a bug or want to suggest a new feature, please [open an issue](https://github.com/NagelsIT/Neo4j-Client/issues) and provide detailed information.

---

We appreciate your contribution — let’s build something powerful together!

13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use an official PHP image as the base image
FROM php:8.1-cli

# Install necessary extensions (e.g., for Composer)
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev git libzip-dev zip \

Check notice on line 5 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L5

Avoid additional packages by specifying `--no-install-recommends`

Check warning on line 5 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L5

Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd zip

# Set working directory
WORKDIR /var/www

# Copy the composer.phar file to the container
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
Loading
Loading