Skip to content

Commit facb3ba

Browse files
committed
Run tests on PHP 8.4 and update test environment
1 parent 5f80055 commit facb3ba

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 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
@@ -20,7 +21,7 @@ jobs:
2021
- 7.2
2122
- 7.1
2223
steps:
23-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2425
- uses: shivammathur/setup-php@v2
2526
with:
2627
php-version: ${{ matrix.php }}
@@ -34,10 +35,11 @@ jobs:
3435

3536
PHPStan:
3637
name: PHPStan (PHP ${{ matrix.php }})
37-
runs-on: ubuntu-22.04
38+
runs-on: ubuntu-24.04
3839
strategy:
3940
matrix:
4041
php:
42+
- 8.4
4143
- 8.3
4244
- 8.2
4345
- 8.1
@@ -46,7 +48,7 @@ jobs:
4648
- 7.3
4749
- 7.2
4850
steps:
49-
- uses: actions/checkout@v4
51+
- uses: actions/checkout@v5
5052
- uses: shivammathur/setup-php@v2
5153
with:
5254
php-version: ${{ matrix.php }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"php": ">=7.1.0"
2929
},
3030
"require-dev": {
31-
"phpstan/phpstan": "1.10.39 || 1.4.10",
31+
"phpstan/phpstan": "1.12.28 || 1.4.10",
3232
"phpunit/phpunit": "^9.6 || ^7.5"
3333
},
3434
"autoload": {

src/Internal/FulfilledPromise.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function catch(callable $onRejected): PromiseInterface
5959
public function finally(callable $onFulfilledOrRejected): PromiseInterface
6060
{
6161
return $this->then(function ($value) use ($onFulfilledOrRejected): PromiseInterface {
62+
/** @var T $value */
6263
return resolve($onFulfilledOrRejected())->then(function () use ($value) {
6364
return $value;
6465
});

src/Promise.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function catch(callable $onRejected): PromiseInterface
9797
public function finally(callable $onFulfilledOrRejected): PromiseInterface
9898
{
9999
return $this->then(static function ($value) use ($onFulfilledOrRejected): PromiseInterface {
100+
/** @var T $value */
100101
return resolve($onFulfilledOrRejected())->then(function () use ($value) {
101102
return $value;
102103
});

tests/FunctionSetRejectionHandlerThatTriggersDefaultHandlerShouldTerminateProgramForUnhandled.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
The callback given to set_rejection_handler() may trigger a fatal error for unhandled rejection
3+
--SKIPIF--
4+
<?php if (PHP_VERSION_ID >= 80400) die("Skipped: PHP < 8.4 only."); ?>
35
--INI--
46
# suppress legacy PHPUnit 7 warning for Xdebug 3
57
xdebug.default_enable=

0 commit comments

Comments
 (0)