From ce63f42319e189cd4869770f798af7c79587c621 Mon Sep 17 00:00:00 2001 From: Paul Rotmann Date: Tue, 25 Mar 2025 09:34:45 +0100 Subject: [PATCH 1/2] Run tests on PHP 8.4 and update test environment --- .github/workflows/ci.yml | 6 ++++-- composer.json | 4 ++-- tests/types/parallel.php | 4 +++- tests/types/series.php | 4 +++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a398ff9..7012617 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -34,10 +35,11 @@ jobs: 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 diff --git a/composer.json b/composer.json index 103048c..ad557f2 100644 --- a/composer.json +++ b/composer.json @@ -28,10 +28,10 @@ "require": { "php": ">=7.1", "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.8 || ^1.2.1" + "react/promise": "^3.2 || ^2.8 || ^1.2.1" }, "require-dev": { - "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpstan/phpstan": "1.12.19 || 1.4.10", "phpunit/phpunit": "^9.6 || ^8.5 || ^7.5" }, "autoload": { diff --git a/tests/types/parallel.php b/tests/types/parallel.php index 02eae2f..550f1dd 100644 --- a/tests/types/parallel.php +++ b/tests/types/parallel.php @@ -6,7 +6,9 @@ use function React\Async\parallel; use function React\Promise\resolve; -assertType('React\Promise\PromiseInterface', parallel([])); +/** @var array $emptyArray */ +$emptyArray = []; +assertType('React\Promise\PromiseInterface', parallel($emptyArray)); assertType('React\Promise\PromiseInterface>', parallel([ static function (): PromiseInterface { return resolve(true); }, diff --git a/tests/types/series.php b/tests/types/series.php index aa68223..7c74b56 100644 --- a/tests/types/series.php +++ b/tests/types/series.php @@ -6,7 +6,9 @@ use function React\Async\series; use function React\Promise\resolve; -assertType('React\Promise\PromiseInterface', series([])); +/** @var array $emptyArray */ +$emptyArray = []; +assertType('React\Promise\PromiseInterface', series($emptyArray)); assertType('React\Promise\PromiseInterface>', series([ static function (): PromiseInterface { return resolve(true); }, From 081a0e4f1584b00d4c8c2202053ba0a721d73310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Mon, 16 Nov 2026 01:25:25 +0100 Subject: [PATCH 2/2] Run tests on PHP 8.5 and update test environment --- .github/workflows/ci.yml | 6 ++++-- composer.json | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7012617..032835c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -21,7 +22,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -39,6 +40,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -48,7 +50,7 @@ jobs: - 7.3 - 7.2 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} diff --git a/composer.json b/composer.json index ad557f2..e40ab32 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,8 @@ ], "require": { "php": ">=7.1", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.8 || ^1.2.1" + "react/event-loop": "^1.6", + "react/promise": "^3.3 || ^2.8 || ^1.2.1" }, "require-dev": { "phpstan/phpstan": "1.12.19 || 1.4.10",