Skip to content

Commit 39e156d

Browse files
authored
Merge pull request #151 from clue-labs/v2-php8.3
[2.x] Run tests on PHP 8.3 and update test suite
2 parents f911455 + 10895e5 commit 39e156d

File tree

4 files changed

+36
-17
lines changed

4 files changed

+36
-17
lines changed

.github/workflows/ci.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.3
15+
- 8.2
1416
- 8.1
1517
- 8.0
1618
- 7.4
@@ -23,7 +25,7 @@ jobs:
2325
- 5.4
2426
- 5.3
2527
steps:
26-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
2729
- uses: shivammathur/setup-php@v2
2830
with:
2931
php-version: ${{ matrix.php }}
@@ -37,14 +39,21 @@ jobs:
3739

3840
PHPUnit-hhvm:
3941
name: PHPUnit (HHVM)
40-
runs-on: ubuntu-18.04
42+
runs-on: ubuntu-22.04
4143
continue-on-error: true
44+
services:
45+
redis:
46+
image: redis
4247
steps:
43-
- uses: actions/checkout@v2
44-
- uses: azjezz/setup-hhvm@v1
48+
- uses: actions/checkout@v4
49+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
50+
- name: Run hhvm composer.phar install
51+
uses: docker://hhvm/hhvm:3.30-lts-latest
4552
with:
46-
version: lts-3.30
47-
- run: composer self-update --2.2 # downgrade Composer for HHVM
48-
- run: hhvm $(which composer) install
49-
- run: docker run --net=host -d redis
50-
- run: REDIS_URI=localhost:6379 hhvm vendor/bin/phpunit
53+
args: hhvm composer.phar install
54+
- name: Run REDIS_URI=redis:6379 hhvm vendor/bin/phpunit
55+
uses: docker://hhvm/hhvm:3.30-lts-latest
56+
with:
57+
args: hhvm vendor/bin/phpunit
58+
env:
59+
REDIS_URI: redis:6379

composer.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
},
2222
"require-dev": {
2323
"clue/block-react": "^1.1",
24-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
24+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
2525
},
2626
"autoload": {
27-
"psr-4": { "Clue\\React\\Redis\\": "src/" }
27+
"psr-4": {
28+
"Clue\\React\\Redis\\": "src/"
29+
}
2830
},
2931
"autoload-dev": {
30-
"psr-4": { "Clue\\Tests\\React\\Redis\\": "tests/" }
32+
"psr-4": {
33+
"Clue\\Tests\\React\\Redis\\": "tests/"
34+
}
3135
}
3236
}

phpunit.xml.dist

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
cacheResult="false"
88
colors="true"
@@ -17,4 +17,7 @@
1717
<directory>./src/</directory>
1818
</include>
1919
</coverage>
20+
<php>
21+
<ini name="error_reporting" value="-1" />
22+
</php>
2023
</phpunit>

phpunit.xml.legacy

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
@@ -15,4 +15,7 @@
1515
<directory>./src/</directory>
1616
</whitelist>
1717
</filter>
18+
<php>
19+
<ini name="error_reporting" value="-1" />
20+
</php>
1821
</phpunit>

0 commit comments

Comments
 (0)