镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
jobs:
PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
php:
- 8.4
- 8.3
- 8.2
- 8.1
Expand All @@ -19,17 +20,18 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }}
ini-file: development
- run: composer install
- run: vendor/bin/phpunit --coverage-text

PHPStan:
name: PHPStan (PHP ${{ matrix.php }})
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
php:
- 8.4
- 8.3
- 8.2
- 8.1
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"react/promise": "^3.2 || ^2.8 || ^1.2.1"
},
"require-dev": {
"phpstan/phpstan": "1.10.39",
"phpstan/phpstan": "1.12.19",
"phpunit/phpunit": "^9.6"
},
"autoload": {
Expand Down
4 changes: 3 additions & 1 deletion tests/types/parallel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
use function React\Async\parallel;
use function React\Promise\resolve;

assertType('React\Promise\PromiseInterface<array>', parallel([]));
/** @var array<callable():mixed> $emptyArray */
$emptyArray = [];
assertType('React\Promise\PromiseInterface<array>', parallel($emptyArray));
Comment thread
WyriHaximus marked this conversation as resolved.
Resolved

assertType('React\Promise\PromiseInterface<array<bool|float|int>>', parallel([
static fn (): PromiseInterface => resolve(true),
Expand Down
4 changes: 3 additions & 1 deletion tests/types/series.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
use function React\Async\series;
use function React\Promise\resolve;

assertType('React\Promise\PromiseInterface<array>', series([]));
/** @var array<callable():mixed> $emptyArray */
$emptyArray = [];
assertType('React\Promise\PromiseInterface<array>', series($emptyArray));
Comment thread
WyriHaximus marked this conversation as resolved.
Resolved

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