Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT]: streamlining of driver #210

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
c97dcd0
updated bolt
transistive Oct 25, 2023
73df247
added default baseline suggestions
transistive Oct 25, 2023
176d747
completely tested and finished authentication layer
transistive Oct 25, 2023
3dbbd7c
removed basic objects
transistive Oct 25, 2023
18a6156
temp
transistive Nov 4, 2023
274030e
adjusted serverstate typing
transistive Nov 5, 2023
5166446
simplified connection
transistive Nov 5, 2023
0eddefb
removed fluff from connection
transistive Nov 5, 2023
0a7a358
created run message
transistive Nov 5, 2023
5963cf9
added hello message
transistive Nov 5, 2023
7d1364c
added Logon and Logoff message
transistive Nov 5, 2023
5c8ce16
added Reset message
transistive Nov 5, 2023
a520f01
created Reset message
transistive Nov 5, 2023
8612ff2
created discard message
transistive Nov 5, 2023
1c8a464
added Pull message
transistive Nov 5, 2023
2c13c20
added Begin message and consolidated transaction logic in base class
transistive Nov 5, 2023
755effe
created commit and rollback message
transistive Nov 5, 2023
a9ceef5
added route message
transistive Nov 5, 2023
7fa13f2
there is noting to patch in supported bolt versions
transistive Nov 5, 2023
43501b0
removed protocol implementation exposure
transistive Nov 5, 2023
2fa72a7
fixed flag bug in connection
transistive Nov 5, 2023
d25a9e7
temp
transistive Dec 4, 2023
700d332
fixed unit tests using bolt 7.0
transistive Mar 28, 2024
fd20fac
finish authentication
transistive Mar 28, 2024
5079e2c
fix psalm authentication
transistive Mar 28, 2024
ad9b8c5
fixed psalm bolt
transistive Mar 28, 2024
38de448
fix psalm common
transistive Mar 28, 2024
d0278a6
psalm databags
transistive Mar 28, 2024
ec9435e
psalm formatter
transistive Mar 28, 2024
6d18818
psalm http
transistive Mar 28, 2024
b65188e
psalm fixed
transistive Mar 28, 2024
43a3a3f
ran php cs fixer
transistive Mar 28, 2024
1ecbd9e
update phpunit to latest version
transistive Mar 28, 2024
ffdaf5b
fixes phpunit
transistive Mar 28, 2024
1f05fae
fix phpunit
transistive Mar 28, 2024
f70d71c
added more bolt versions
stefanak-michal Mar 30, 2024
09e1315
method has to return hello response, not logon.
stefanak-michal Mar 30, 2024
c4539d0
we should do something about the open transaction
stefanak-michal Mar 30, 2024
1624dc3
simplified test
stefanak-michal Mar 30, 2024
cf090d3
static analysis
transistive Mar 30, 2024
e9d6dd8
reset, or not to reset
stefanak-michal Mar 31, 2024
dc75b65
fixed few tests. moved reset to better place.
stefanak-michal Apr 2, 2024
8335f8b
Added server state check for bolt.
stefanak-michal Apr 3, 2024
2a11d50
raised php versions. removed forced value for phpunit, let it be take…
stefanak-michal Apr 8, 2024
0420bc7
use composer version
transistive Apr 9, 2024
b46c1dc
Merge branch 'ISSUE-198' of github.com:neo4j-php/neo4j-php-client int…
transistive Apr 9, 2024
bf836b2
use version 10 hardocded
transistive Apr 9, 2024
4012d62
fix: Unit tests
exaby73 Jun 26, 2024
b29a536
reset, or not to reset
stefanak-michal Mar 31, 2024
0828bbd
fixed few tests. moved reset to better place.
stefanak-michal Apr 2, 2024
5ea9bfe
Added server state check for bolt.
stefanak-michal Apr 3, 2024
8e26e6c
raised php versions. removed forced value for phpunit, let it be take…
stefanak-michal Apr 8, 2024
2c2e496
use version 10 hardocded
transistive Apr 9, 2024
d165f92
fix: Unit tests
exaby73 Jun 26, 2024
03f343d
Merge remote-tracking branch 'origin/ISSUE-198' into ISSUE-198
exaby73 Jun 26, 2024
cbee49d
fix: update bolt to newest version and revert changes from previous c…
exaby73 Jun 26, 2024
5763131
fix: revert change to getContent
exaby73 Jun 26, 2024
dfcfaba
temp
transistive Jul 3, 2024
49928c5
test using core1
transistive Jul 3, 2024
16052ef
Merge remote-tracking branch 'origin/main' into ISSUE-198
transistive Jul 3, 2024
e9ff502
Merge branch 'ISSUE-198' into bolt-update
transistive Jul 3, 2024
72e1237
temp commit
transistive Jul 3, 2024
3f193b2
temp commit
transistive Jul 4, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/integration-test-aura.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
- uses: php-actions/composer@v6
with:
progress: yes
php_version: 8.0
php_version: 8.1
version: 2
- name: clean database
run: CONNECTION=$CONNECTION php tests/clean-database.php
- uses: php-actions/phpunit@v3
with:
configuration: phpunit.xml.dist
php_version: 8.0
php_version: 8.1
memory_limit: 1024M
version: 9
version: 10
testsuite: Integration
bootstrap: vendor/autoload.php
10 changes: 5 additions & 5 deletions .github/workflows/integration-test-cluster-neo4j-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
tests:
runs-on: ubuntu-latest
env:
CONNECTION: neo4j://neo4j:testtest@localhost:7688
name: "Running on PHP 8.0 in a Neo4j 4.4 cluster"
CONNECTION: neo4j://neo4j:testtest@core1:7688
name: "Running on PHP 8.1 in a Neo4j 4.4 cluster"

steps:
- uses: actions/checkout@v2
Expand All @@ -25,14 +25,14 @@ jobs:
- uses: php-actions/composer@v6
with:
progress: yes
php_version: 8.0
php_version: 8.1
version: 2
- uses: php-actions/phpunit@v3
with:
configuration: phpunit.xml.dist
php_version: 8.0
php_version: 8.1
memory_limit: 1024M
version: 9
version: 10
testsuite: Integration
bootstrap: vendor/autoload.php

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-test-cluster-neo4j-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
env:
CONNECTION: neo4j://neo4j:testtest@localhost:7687
name: "Running on PHP 8.0 with a Neo4j 5.10-enterprise cluster"
name: "Running on PHP 8.1 with a Neo4j 5.10-enterprise cluster"

steps:
- uses: actions/checkout@v2
Expand All @@ -25,14 +25,14 @@ jobs:
- uses: php-actions/composer@v6
with:
progress: yes
php_version: 8.0
php_version: 8.1
version: 2
- uses: php-actions/phpunit@v3
with:
configuration: phpunit.xml.dist
php_version: 8.0
php_version: 8.1
memory_limit: 1024M
version: 9
version: 10
testsuite: Integration
bootstrap: vendor/autoload.php

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
- uses: php-actions/composer@v6
with:
progress: yes
php_version: 8.2
php_version: 8.1
version: 2
- uses: php-actions/phpunit@v3
with:
configuration: phpunit.xml.dist
php_version: 8.2
php_version: 8.1
memory_limit: 1024M
version: 9
version: 10
testsuite: Unit
bootstrap: vendor/autoload.php
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ composer.lock
.env
/docs/_build
cachegrind.out.*
.phpunit.cache/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.0-cli
FROM php:8.1-cli
RUN apt-get update \
&& apt-get install -y \
libzip-dev \
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
"psr/http-factory": "^1.0",
"psr/http-client": "^1.0",
"php-http/message": "^1.0",
"stefanak-michal/bolt": "^6.0",
"stefanak-michal/bolt": "^7.0.1",
"symfony/polyfill-php80": "^1.2",
"psr/simple-cache": ">=2.0",
"ext-json": "*",
"ext-mbstring": "*"
"ext-mbstring": "*",
"psr/event-dispatcher": "^1.0"
},
"provide": {
"psr/simple-cache-implementation": "2.0|3.0"
Expand All @@ -43,7 +44,7 @@
"composer-runtime-api": "Install composer 2 for auto detection of version in user agent"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^10.0",
"nyholm/psr7": "^1.3",
"nyholm/psr7-server": "^1.0",
"kriswallsmith/buzz": "^1.2",
Expand Down
35 changes: 16 additions & 19 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<phpunit colors="true" verbose="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
convertDeprecationsToExceptions="true"
>
<testsuites>
<testsuite name="Integration">
<directory>./tests/Integration</directory>
</testsuite>
<testsuite name="Performance">
<directory>./tests/Performance</directory>
</testsuite>
<testsuite name="Unit">
<directory>./tests/Unit</directory>
</testsuite>
</testsuites>
<php>
<env name="CONNECTION" value="neo4j://neo4j:testtest@localhost" />
</php>
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Integration">
<directory>./tests/Integration</directory>
</testsuite>
<testsuite name="Performance">
<directory>./tests/Performance</directory>
</testsuite>
<testsuite name="Unit">
<directory>./tests/Unit</directory>
</testsuite>
</testsuites>
<php>
<env name="CONNECTION" value="neo4j://neo4j:testtest@localhost:11687"/>
</php>
</phpunit>
181 changes: 0 additions & 181 deletions psalm-baseline.xml

This file was deleted.

3 changes: 2 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
hoistConstants="true"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="true"
findUnusedCode="true"
>
<projectFiles>
<directory name="src"/>
Expand Down
7 changes: 4 additions & 3 deletions src/Authentication/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

use function explode;

use Laudis\Neo4j\Contracts\AuthenticateInterface;
use Psr\Http\Message\UriInterface;

use function substr_count;
Expand Down Expand Up @@ -72,7 +71,7 @@ public static function disabled(): NoAuth
*
* @pure
*/
public static function fromUrl(UriInterface $uri): AuthenticateInterface
public static function fromUrl(UriInterface $uri): BasicAuth|NoAuth
{
/**
* @psalm-suppress ImpureMethodCall Uri is a pure object:
Expand All @@ -82,7 +81,9 @@ public static function fromUrl(UriInterface $uri): AuthenticateInterface
$userInfo = $uri->getUserInfo();

if (substr_count($userInfo, ':') === 1) {
[$user, $pass] = explode(':', $userInfo);
/** @var array{0: string, 1: string} $explode */
$explode = explode(':', $userInfo);
[$user, $pass] = $explode;

return self::basic($user, $pass);
}
Expand Down
Loading
Loading