diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a398ff9..032835c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,12 @@ on: jobs: PHPUnit: name: PHPUnit (PHP ${{ matrix.php }}) - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: php: + - 8.5 + - 8.4 - 8.3 - 8.2 - 8.1 @@ -20,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 }} @@ -34,10 +36,12 @@ jobs: PHPStan: name: PHPStan (PHP ${{ matrix.php }}) - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: php: + - 8.5 + - 8.4 - 8.3 - 8.2 - 8.1 @@ -46,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 103048c..e40ab32 100644 --- a/composer.json +++ b/composer.json @@ -27,11 +27,11 @@ ], "require": { "php": ">=7.1", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.8 || ^1.2.1" + "react/event-loop": "^1.6", + "react/promise": "^3.3 || ^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); },