Skip to content

Commit 61bbb92

Browse files
authored
Merge pull request #40 from clue-labs/tests
Run tests on PHP 8.3 and update test suite
2 parents 6ddf7da + c9953de commit 61bbb92

File tree

4 files changed

+31
-20
lines changed

4 files changed

+31
-20
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.3
1415
- 8.2
1516
- 8.1
1617
- 8.0
@@ -24,7 +25,7 @@ jobs:
2425
- 5.4
2526
- 5.3
2627
steps:
27-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
2829
- uses: shivammathur/setup-php@v2
2930
with:
3031
php-version: ${{ matrix.php }}
@@ -37,13 +38,16 @@ jobs:
3738

3839
PHPUnit-hhvm:
3940
name: PHPUnit (HHVM)
40-
runs-on: ubuntu-18.04
41+
runs-on: ubuntu-24.04
4142
continue-on-error: true
4243
steps:
43-
- uses: actions/checkout@v2
44-
- uses: azjezz/setup-hhvm@v1
44+
- uses: actions/checkout@v4
45+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
46+
- name: Run hhvm composer.phar require react/promise:^2 # downgrade Promise for HHVM
47+
uses: docker://hhvm/hhvm:3.30-lts-latest
4548
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: hhvm vendor/phpunit/phpunit/phpunit
49+
args: hhvm composer.phar require react/promise:^2
50+
- name: Run hhvm vendor/bin/phpunit
51+
uses: docker://hhvm/hhvm:3.30-lts-latest
52+
with:
53+
args: hhvm vendor/bin/phpunit

composer.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
"email": "[email protected]"
1111
}
1212
],
13-
"autoload": {
14-
"psr-4": { "ConnectionManager\\Extra\\": "src" }
15-
},
16-
"autoload-dev": {
17-
"psr-4": { "ConnectionManager\\Tests\\Extra\\": "tests/" }
18-
},
1913
"require": {
2014
"php": ">=5.3",
2115
"react/event-loop": "^1.2",
@@ -24,6 +18,16 @@
2418
"react/socket": "^1.12"
2519
},
2620
"require-dev": {
27-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8"
21+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"ConnectionManager\\Extra\\": "src/"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"ConnectionManager\\Tests\\Extra\\": "tests/"
31+
}
2832
}
2933
}

phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
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"

phpunit.xml.legacy

Lines changed: 4 additions & 1 deletion
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)