Skip to content

Commit cbb45c0

Browse files
committed
Run tests on PHP 8.3 and update test suite
1 parent 44a7ceb commit cbb45c0

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.3
15+
- 8.2
16+
- 8.1
17+
- 8.0
1418
- 7.4
1519
- 7.3
1620
- 7.2
@@ -21,7 +25,7 @@ jobs:
2125
- 5.4
2226
- 5.3
2327
steps:
24-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2529
- uses: shivammathur/setup-php@v2
2630
with:
2731
php-version: ${{ matrix.php }}
@@ -38,7 +42,7 @@ jobs:
3842
runs-on: ubuntu-22.04
3943
continue-on-error: true
4044
steps:
41-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4246
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
4347
- name: Run hhvm composer.phar install
4448
uses: docker://hhvm/hhvm:3.30-lts-latest

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@
99
"php": ">=5.3.3"
1010
},
1111
"require-dev": {
12-
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36"
12+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
1313
},
1414
"autoload": {
1515
"psr-4": {
16-
"React\\Promise\\": "src/React/Promise/"
16+
"React\\Promise\\": "src/React/Promise/"
1717
},
18-
"files": ["src/React/Promise/functions_include.php"]
18+
"files": [
19+
"src/React/Promise/functions_include.php"
20+
]
1921
},
2022
"autoload-dev": {
2123
"psr-4": {
22-
"React\\Tests\\Promise\\": "tests/React/Promise/"
24+
"React\\Tests\\Promise\\": "tests/React/Promise/"
2325
}
2426
},
2527
"extra": {

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.5+ -->
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
cacheResult="false"
88
colors="true"
@@ -20,7 +20,7 @@
2020
<php>
2121
<ini name="error_reporting" value="-1" />
2222
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
23-
<!-- <ini name="zend.assertions=1" value="1" /> -->
23+
<!-- <ini name="zend.assertions" value="1" /> -->
2424
<ini name="assert.active" value="1" />
2525
<ini name="assert.exception" value="1" />
2626
<ini name="assert.bail" value="0" />

phpunit.xml.legacy

Lines changed: 2 additions & 2 deletions
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 before PHPUnit 9 -->
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"
@@ -18,7 +18,7 @@
1818
<php>
1919
<ini name="error_reporting" value="-1" />
2020
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
21-
<!-- <ini name="zend.assertions=1" value="1" /> -->
21+
<!-- <ini name="zend.assertions" value="1" /> -->
2222
<ini name="assert.active" value="1" />
2323
<ini name="assert.exception" value="1" />
2424
<ini name="assert.bail" value="0" />

tests/React/Promise/ErrorCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public function register()
1010
{
1111
$errors = array();
1212

13-
set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) use (&$errors) {
14-
$errors[] = compact('errno', 'errstr', 'errfile', 'errline', 'errcontext');
13+
set_error_handler(function ($errno, $errstr, $errfile, $errline) use (&$errors) {
14+
$errors[] = compact('errno', 'errstr', 'errfile', 'errline');
1515
});
1616

1717
$this->errors = &$errors;

0 commit comments

Comments
 (0)