Skip to content

Commit 0128021

Browse files
authored
Merge pull request #36 from hubipe/1.2.x
PHP 8.4 compatibility for 1.2.* releases
2 parents 44a67cb + abc86c4 commit 0128021

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Change Log
2+
## 1.2.2
3+
4+
### Added - 2025-10-31
5+
6+
- Compatibility with PHP 8.4
27

38
## 1.2.1
49

src/FulfilledPromise.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct($result)
2929
/**
3030
* {@inheritdoc}
3131
*/
32-
public function then(callable $onFulfilled = null, callable $onRejected = null)
32+
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
3333
{
3434
if (null === $onFulfilled) {
3535
return $this;

src/Promise.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface Promise
4545
*
4646
* @template V
4747
*/
48-
public function then(callable $onFulfilled = null, callable $onRejected = null);
48+
public function then(?callable $onFulfilled = null, ?callable $onRejected = null);
4949

5050
/**
5151
* Returns the state of the promise, one of PENDING, FULFILLED or REJECTED.

src/RejectedPromise.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(\Exception $exception)
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function then(callable $onFulfilled = null, callable $onRejected = null)
29+
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
3030
{
3131
if (null === $onRejected) {
3232
return $this;

0 commit comments

Comments
 (0)