Skip to content
Merged
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
10 changes: 6 additions & 4 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 @@ -20,7 +21,7 @@ jobs:
- 7.2
- 7.1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -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
Expand All @@ -46,7 +48,7 @@ jobs:
- 7.3
- 7.2
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"php": ">=7.1.0"
},
"require-dev": {
"phpstan/phpstan": "1.10.39 || 1.4.10",
"phpstan/phpstan": "1.12.28 || 1.4.10",
"phpunit/phpunit": "^9.6 || ^7.5"
},
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions src/Internal/FulfilledPromise.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function catch(callable $onRejected): PromiseInterface
public function finally(callable $onFulfilledOrRejected): PromiseInterface
{
return $this->then(function ($value) use ($onFulfilledOrRejected): PromiseInterface {
/** @var T $value */
return resolve($onFulfilledOrRejected())->then(function () use ($value) {
return $value;
});
Expand Down
1 change: 1 addition & 0 deletions src/Promise.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public function catch(callable $onRejected): PromiseInterface
public function finally(callable $onFulfilledOrRejected): PromiseInterface
{
return $this->then(static function ($value) use ($onFulfilledOrRejected): PromiseInterface {
/** @var T $value */
return resolve($onFulfilledOrRejected())->then(function () use ($value) {
return $value;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
The callback given to set_rejection_handler() may trigger a fatal error for unhandled rejection
--SKIPIF--
<?php if (PHP_VERSION_ID >= 80400) die("Skipped: PHP < 8.4 only."); ?>
--INI--
# suppress legacy PHPUnit 7 warning for Xdebug 3
xdebug.default_enable=
Expand Down