Skip to content

Commit 7257bec

Browse files
committed
Merge branch 'main' into ci/php-8.3
2 parents 5046422 + bc4b9e5 commit 7257bec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+732
-385
lines changed

.github/workflows/integration-test-cluster-neo4j-4.yml

Lines changed: 11 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -17,126 +17,15 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v2
20-
- name: Cache Composer dependencies
21-
uses: actions/cache@v2
20+
- name: Populate .env
21+
run: |
22+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
23+
- uses: hoverkraft-tech/[email protected]
24+
name: Start services
2225
with:
23-
path: /tmp/composer-cache
24-
key: ${{ runner.os }}-8.0-${{ hashFiles('**/composer.lock') }}
25-
- uses: php-actions/composer@v6
26-
with:
27-
progress: yes
28-
php_version: 8.3
29-
version: 2
30-
- uses: php-actions/phpunit@v3
31-
with:
32-
configuration: phpunit.xml.dist
33-
php_version: 8.1
34-
memory_limit: 1024M
35-
version: 10
36-
testsuite: Integration
37-
bootstrap: vendor/autoload.php
38-
39-
services:
40-
core1:
41-
image: neo4j:4.4-enterprise
42-
options: >-
43-
--health-cmd "wget -q --method=HEAD http://localhost:7475 || exit 1"
44-
--health-start-period "60s"
45-
--health-interval "30s"
46-
--health-timeout "15s"
47-
--health-retries "5"
48-
ports:
49-
- 7688:7688
50-
- 7475:7475
51-
env:
52-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
53-
NEO4JLABS_PLUGINS: '["apoc"]'
54-
NEO4J_AUTH: neo4j/testtest
55-
NEO4J_dbms_mode: CORE
56-
NEO4J_causal__clustering_discovery__advertised__address: core1:5000
57-
NEO4J_causal__clustering_transaction__advertised__address: core1:6000
58-
NEO4J_causal__clustering_raft__advertised__address: core1:7000
59-
NEO4J_causal__clustering_initial__discovery__members: core1:5000,core2:5000,core3:5000
60-
NEO4J_causal__clustering_discovery__listen__address: 0.0.0.0:5000
61-
NEO4J_causal__clustering_transaction__listen__address: 0.0.0.0:6000
62-
NEO4J_causal__clustering_raft__listen__address: 0.0.0.0:7000
63-
NEO4J_dbms_connector_http_listen__address: 0.0.0.0:7475
64-
NEO4J_dbms_connector_bolt_listen__address: 0.0.0.0:7688
65-
66-
core2:
67-
image: neo4j:4.4-enterprise
68-
options: >-
69-
--health-cmd "wget -q --method=HEAD http://localhost:7476 || exit 1"
70-
--health-start-period "60s"
71-
--health-interval "30s"
72-
--health-timeout "15s"
73-
--health-retries "5"
74-
ports:
75-
- 7689:7689
76-
- 7476:7476
77-
env:
78-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
79-
NEO4JLABS_PLUGINS: '["apoc"]'
80-
NEO4J_AUTH: neo4j/testtest
81-
NEO4J_dbms_mode: CORE
82-
NEO4J_causal__clustering_discovery__advertised__address: core2:5000
83-
NEO4J_causal__clustering_transaction__advertised__address: core2:6000
84-
NEO4J_causal__clustering_raft__advertised__address: core2:7000
85-
NEO4J_causal__clustering_initial__discovery__members: core1:5000,core2:5000,core3:5000
86-
NEO4J_causal__clustering_discovery__listen__address: 0.0.0.0:5000
87-
NEO4J_causal__clustering_transaction__listen__address: 0.0.0.0:6000
88-
NEO4J_causal__clustering_raft__listen__address: 0.0.0.0:7000
89-
NEO4J_dbms_connector_http_listen__address: 0.0.0.0:7476
90-
NEO4J_dbms_connector_bolt_listen__address: 0.0.0.0:7689
91-
92-
core3:
93-
image: neo4j:4.4-enterprise
94-
options: >-
95-
--health-cmd "wget -q --method=HEAD http://localhost:7477 || exit 1"
96-
--health-start-period "60s"
97-
--health-interval "30s"
98-
--health-timeout "15s"
99-
--health-retries "5"
100-
ports:
101-
- 7690:7690
102-
- 7477:7477
103-
env:
104-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
105-
NEO4JLABS_PLUGINS: '["apoc"]'
106-
NEO4J_AUTH: neo4j/testtest
107-
NEO4J_dbms_mode: CORE
108-
NEO4J_causal__clustering_discovery__advertised__address: core3:5000
109-
NEO4J_causal__clustering_transaction__advertised__address: core3:6000
110-
NEO4J_causal__clustering_raft__advertised__address: core3:7000
111-
NEO4J_causal__clustering_initial__discovery__members: core1:5000,core2:5000,core3:5000
112-
NEO4J_causal__clustering_discovery__listen__address: 0.0.0.0:5000
113-
NEO4J_causal__clustering_transaction__listen__address: 0.0.0.0:6000
114-
NEO4J_causal__clustering_raft__listen__address: 0.0.0.0:7000
115-
NEO4J_dbms_connector_http_listen__address: 0.0.0.0:7477
116-
NEO4J_dbms_connector_bolt_listen__address: 0.0.0.0:7690
117-
118-
readreplica1:
119-
image: neo4j:4.4-enterprise
120-
options: >-
121-
--health-cmd "wget -q --method=HEAD http://localhost:7478 || exit 1"
122-
--health-start-period "60s"
123-
--health-interval "30s"
124-
--health-timeout "15s"
125-
--health-retries "5"
126-
ports:
127-
- 7691:7691
128-
- 7478:7478
129-
env:
130-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
131-
NEO4JLABS_PLUGINS: '["apoc"]'
132-
NEO4J_AUTH: neo4j/testtest
133-
NEO4J_dbms_mode: READ_REPLICA
134-
NEO4J_causal__clustering_discovery__advertised__address: readreplica1:5000
135-
NEO4J_causal__clustering_transaction__advertised__address: readreplica1:6000
136-
NEO4J_causal__clustering_raft__advertised__address: readreplica1:7000
137-
NEO4J_causal__clustering_initial__discovery__members: core1:5000,core2:5000,core3:5000
138-
NEO4J_causal__clustering_discovery__listen__address: 0.0.0.0:5000
139-
NEO4J_causal__clustering_transaction__listen__address: 0.0.0.0:6000
140-
NEO4J_causal__clustering_raft__listen__address: 0.0.0.0:7000
141-
NEO4J_dbms_connector_http_listen__address: 0.0.0.0:7478
142-
NEO4J_dbms_connector_bolt_listen__address: 0.0.0.0:7691
26+
compose-file: './docker-compose-neo4j-4.yml'
27+
up-flags: '--build --remove-orphans'
28+
- name: Test
29+
run: |
30+
docker compose run client composer install
31+
docker compose run client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

.github/workflows/integration-test-cluster-neo4j-5.yml

Lines changed: 11 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -17,107 +17,15 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v2
20-
- name: Cache Composer dependencies
21-
uses: actions/cache@v2
20+
- name: Populate .env
21+
run: |
22+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
23+
- uses: hoverkraft-tech/[email protected]
24+
name: Start services
2225
with:
23-
path: /tmp/composer-cache
24-
key: ${{ runner.os }}-8.0-${{ hashFiles('**/composer.lock') }}
25-
- uses: php-actions/composer@v6
26-
with:
27-
progress: yes
28-
php_version: 8.3
29-
version: 2
30-
- uses: php-actions/phpunit@v3
31-
with:
32-
configuration: phpunit.xml.dist
33-
php_version: 8.1
34-
memory_limit: 1024M
35-
version: 10
36-
testsuite: Integration
37-
bootstrap: vendor/autoload.php
38-
39-
services:
40-
server1:
41-
image: neo4j:5.20-enterprise
42-
ports:
43-
- 7687:7687
44-
- 7473:7473
45-
- 7474:7474
46-
env:
47-
NEO4J_initial_server_mode__constraint: PRIMARY
48-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
49-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
50-
NEO4j_server_bolt_advertised_address: localhost:7687
51-
NEO4j_server_http_advertised_address: localhost:7474
52-
NEO4J_PLUGINS: '["apoc"]'
53-
NEO4J_AUTH: neo4j/testtest
54-
options: >-
55-
--hostname server1
56-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
57-
--health-start-period "60s"
58-
--health-interval "30s"
59-
--health-timeout "15s"
60-
--health-retries "5"
61-
server2:
62-
image: neo4j:5.20-enterprise
63-
ports:
64-
- 8687:7687
65-
- 8473:7473
66-
- 8474:7474
67-
env:
68-
NEO4J_initial_server_mode__constraint: PRIMARY
69-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
70-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
71-
NEO4j_server_bolt_advertised_address: localhost:8687
72-
NEO4j_server_http_advertised_address: localhost:8474
73-
NEO4J_PLUGINS: '["apoc"]'
74-
NEO4J_AUTH: neo4j/testtest
75-
options: >-
76-
--hostname server2
77-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
78-
--health-start-period "60s"
79-
--health-interval "30s"
80-
--health-timeout "15s"
81-
--health-retries "5"
82-
server3:
83-
image: neo4j:5.20-enterprise
84-
ports:
85-
- 9474:7474
86-
- 9473:7473
87-
- 9687:7687
88-
env:
89-
NEO4J_initial_server_mode__constraint: PRIMARY
90-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
91-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
92-
NEO4j_server_bolt_advertised_address: localhost:9687
93-
NEO4j_server_http_advertised_address: localhost:9474
94-
NEO4J_PLUGINS: '["apoc"]'
95-
NEO4J_AUTH: neo4j/testtest
96-
options: >-
97-
--hostname server3
98-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
99-
--health-start-period "60s"
100-
--health-interval "30s"
101-
--health-timeout "15s"
102-
--health-retries "5"
103-
read-server4:
104-
image: neo4j:5.20-enterprise
105-
ports:
106-
- 10474:7474
107-
- 10473:7473
108-
- 10687:7687
109-
env:
110-
NEO4J_initial_server_mode__constraint: SECONDARY
111-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
112-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
113-
NEO4j_server_bolt_advertised_address: localhost:10687
114-
NEO4j_server_http_advertised_address: localhost:10474
115-
NEO4J_PLUGINS: '["apoc"]'
116-
NEO4J_AUTH: neo4j/testtest
117-
options: >-
118-
--hostname read-server4
119-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
120-
--health-start-period "60s"
121-
--health-interval "30s"
122-
--health-timeout "15s"
123-
--health-retries "5"
26+
compose-file: './docker-compose.yml'
27+
up-flags: '--build --remove-orphans'
28+
- name: Test
29+
run: |
30+
docker compose run client composer install
31+
docker compose run client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

.github/workflows/integration-test-single-server.yml

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,55 @@ on:
99
- main
1010

1111
jobs:
12-
tests:
12+
tests-v4:
1313
runs-on: ubuntu-latest
14-
name: "Running on PHP 8.3 with a Neo4j 5 instance connecting over all available protocols"
15-
16-
services:
17-
neo4j:
18-
image: neo4j:5
19-
env:
20-
NEO4J_AUTH: neo4j/testtest
21-
NEO4JLABS_PLUGINS: '["apoc"]'
22-
ports:
23-
- 7687:7687
24-
- 7474:7474
25-
options: >-
26-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
27-
--health-start-period "60s"
28-
--health-interval "30s"
29-
--health-timeout "15s"
30-
--health-retries "5"
14+
name: "Running on PHP 8.1 with a Neo4j 4 instance connecting over all available protocols"
3115

3216
steps:
3317
- uses: actions/checkout@v2
34-
- name: Cache Composer dependencies
35-
uses: actions/cache@v2
18+
- name: Populate .env
19+
run: |
20+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
21+
- uses: hoverkraft-tech/[email protected]
22+
name: Start services
3623
with:
37-
path: /tmp/composer-cache
38-
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
39-
- uses: php-actions/composer@v6
24+
compose-file: './docker-compose-neo4j-4.yml'
25+
up-flags: '--build --remove-orphans'
26+
- name: Composer install
27+
run: |
28+
docker compose run client composer install
29+
- name: Test neo4j://
30+
run: |
31+
docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
32+
- name: Test bolt://
33+
run: |
34+
docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
35+
- name: Test http://
36+
run: |
37+
docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
38+
tests-v5:
39+
runs-on: ubuntu-latest
40+
name: "Running on PHP 8.1 with a Neo4j 5 instance connecting over all available protocols"
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Populate .env
45+
run: |
46+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
47+
- uses: hoverkraft-tech/[email protected]
48+
name: Start services
4049
with:
41-
progress: yes
42-
php_version: 8.3
43-
version: 2
44-
- name: Test multiple connections
45-
run: |
46-
CONNECTION=neo4j://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
47-
CONNECTION=bolt://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
48-
CONNECTION=http://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
49-
wait
50+
compose-file: './docker-compose.yml'
51+
up-flags: '--build'
52+
- name: Composer install
53+
run: |
54+
docker compose run client composer install
55+
- name: Test neo4j://
56+
run: |
57+
docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
58+
- name: Test bolt://
59+
run: |
60+
docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
61+
- name: Test http://
62+
run: |
63+
docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"suggest": {
4141
"ext-bcmath": "Needed to implement bolt protocol",
4242
"ext-sysvsem": "Needed for enabling connection pooling between processes",
43-
"composer-runtime-api": "Install composer 2 for auto detection of version in user agent"
43+
"composer-runtime-api": "Install composer 2 for auto detection of version in user agent",
44+
"psr/log": "Needed to enable logging"
4445
},
4546
"require-dev": {
4647
"phpunit/phpunit": "^10.0",
@@ -51,12 +52,12 @@
5152
"friendsofphp/php-cs-fixer": "3.15.0",
5253
"psalm/plugin-phpunit": "^0.18",
5354
"monolog/monolog": "^2.2",
54-
"psr/log": "^1.1",
5555
"symfony/uid": "^5.0",
5656
"symfony/var-dumper": "^5.0",
5757
"cache/integration-tests": "dev-master",
5858
"kubawerlos/php-cs-fixer-custom-fixers": "3.13.*",
59-
"rector/rector": "^1.0"
59+
"rector/rector": "^1.0",
60+
"psr/log": "^3.0"
6061
},
6162
"autoload": {
6263
"psr-4": {

0 commit comments

Comments
 (0)