Skip to content

Commit ef823a7

Browse files
committed
merge conflicts are resolved
2 parents 39f4458 + fba075f commit ef823a7

32 files changed

+2235
-1384
lines changed

.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Database Configuration
2+
NEO4J_ADDRESS=https://6f72daa1.databases.neo4j.io/
3+
NEO4J_USERNAME=neo4j
4+
NEO4J_PASSWORD=O9lWmptqBgxBOz8NVcTJjgs3cHPyYmsy63ui6Spmw1d0

.github/workflows/cs-fixer.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PHP CS Fixer
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**/*.php'
9+
pull_request:
10+
paths:
11+
- '**/*.php'
12+
workflow_dispatch:
13+
14+
jobs:
15+
php-cs-fixer:
16+
name: PHP CS Fixer
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: 8.2
27+
tools: composer
28+
29+
- name: Install dependencies
30+
run: composer install --no-progress --prefer-dist
31+
32+
- name: Run PHP CS Fixer
33+
run: vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes

.github/workflows/ci.yml renamed to .github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_dispatch:
89

910
concurrency:
1011
group: ${{ github.ref }}
@@ -35,7 +36,9 @@ jobs:
3536
- name: Install dependencies
3637
run: composer install --no-progress --prefer-dist
3738

38-
39-
4039
- name: Run Tests without phpunit.xml
40+
env:
41+
NEO4J_ADDRESS: ${{ secrets.NEO4J_ADDRESS }}
42+
NEO4J_USERNAME: ${{ secrets.NEO4J_USERNAME }}
43+
NEO4J_PASSWORD: ${{ secrets.NEO4J_PASSWORD }}
4144
run: vendor/bin/phpunit --configuration phpunit.dist.xml

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1+
2+
#IDE
13
.idea/
4+
5+
#COMPOSER
26
vendor
7+
8+
#PHPUNIT
39
phpunit.xml
410
test
511
.phpunit.result.cache
12+
13+
#PHP-CS-FIXER
14+
.php-cs-fixer.php
15+
.php-cs-fixer.cache
16+
17+

.php-cs-fixer.dist.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php declare(strict_types=1);
2+
3+
use PhpCsFixer\Config;
4+
use PhpCsFixer\Finder;
5+
6+
return (new Config())
7+
->setRules([
8+
'@PSR12' => true,
9+
])
10+
->setFinder(
11+
Finder::create()
12+
->in(__DIR__)
13+
->exclude([
14+
'vendor',
15+
])
16+
);

.php-cs-fixer.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php declare(strict_types=1);
2+
3+
use PhpCsFixer\Config;
4+
use PhpCsFixer\Finder;
5+
6+
return (new Config())
7+
->setRiskyAllowed(true) // Allow risky fixers
8+
->setRules([
9+
'@PSR12' => true,
10+
'strict_param' => true, // This is a risky rule
11+
])
12+
->setFinder(
13+
Finder::create()
14+
->in(__DIR__)
15+
->exclude([
16+
'vendor',
17+
])
18+
);

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Query API
2+
3+
Usage example:
4+
5+
```php
6+
use Neo4j\QueryAPI\Neo4jQueryAPI;
7+
use Neo4j\QueryAPI\Objects\Authentication;
8+
9+
$client = Neo4jQueryAPI::login('https://myaddress.com', Authentication::bearer('mytokken'))
10+
```

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"guzzlehttp/guzzle": "^7.9",
77
"psr/http-client": "^1.0",
88
"ext-json": "*",
9-
"php": "^8.1"
9+
"php": "^8.1",
10+
"nyholm/psr7": "^1.8"
1011
},
11-
1212
"require-dev": {
13-
"phpunit/phpunit": "^10.0",
14-
"vimeo/psalm": "^5.26",
15-
"friendsofphp/php-cs-fixer": "^3.67"
13+
"phpunit/phpunit": "^11.0",
14+
"friendsofphp/php-cs-fixer": "^3.68"
15+
1616
},
1717
"autoload": {
1818
"psr-4": {
@@ -30,10 +30,15 @@
3030
"email": "[email protected]"
3131
}
3232
],
33-
"symfony/finder": "^7.2",
3433
"config": {
3534
"allow-plugins": {
3635
"php-http/discovery": true
3736
}
37+
},
38+
39+
"scripts": {
40+
"cs": "vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes",
41+
"cs:fix": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
3842
}
43+
3944
}

0 commit comments

Comments
 (0)