Skip to content

Commit 09d1868

Browse files
committed
Run tests on PHP 8.4 and update test environment
1 parent 635d50e commit 09d1868

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 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-22.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.4
1415
- 8.3
1516
- 8.2
1617
- 8.1
@@ -19,17 +20,18 @@ jobs:
1920
- uses: shivammathur/setup-php@v2
2021
with:
2122
php-version: ${{ matrix.php }}
22-
coverage: xdebug
23+
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
2324
ini-file: development
2425
- run: composer install
2526
- run: vendor/bin/phpunit --coverage-text
2627

2728
PHPStan:
2829
name: PHPStan (PHP ${{ matrix.php }})
29-
runs-on: ubuntu-22.04
30+
runs-on: ubuntu-24.04
3031
strategy:
3132
matrix:
3233
php:
34+
- 8.4
3335
- 8.3
3436
- 8.2
3537
- 8.1

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"react/promise": "^3.2 || ^2.8 || ^1.2.1"
3232
},
3333
"require-dev": {
34-
"phpstan/phpstan": "1.10.39",
34+
"phpstan/phpstan": "1.12.19",
3535
"phpunit/phpunit": "^9.6"
3636
},
3737
"autoload": {

tests/types/parallel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
use function React\Async\parallel;
77
use function React\Promise\resolve;
88

9-
assertType('React\Promise\PromiseInterface<array>', parallel([]));
9+
/** @var array<callable():mixed> $emptyArray */
10+
$emptyArray = [];
11+
assertType('React\Promise\PromiseInterface<array>', parallel($emptyArray));
1012

1113
assertType('React\Promise\PromiseInterface<array<bool|float|int>>', parallel([
1214
static fn (): PromiseInterface => resolve(true),

tests/types/series.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
use function React\Async\series;
77
use function React\Promise\resolve;
88

9-
assertType('React\Promise\PromiseInterface<array>', series([]));
9+
/** @var array<callable():mixed> $emptyArray */
10+
$emptyArray = [];
11+
assertType('React\Promise\PromiseInterface<array>', series($emptyArray));
1012

1113
assertType('React\Promise\PromiseInterface<array<bool|float|int>>', series([
1214
static fn (): PromiseInterface => resolve(true),

0 commit comments

Comments
 (0)