Skip to content
Snippets Groups Projects
Commit 2a4ce400 authored by David Prévot's avatar David Prévot
Browse files

New upstream version 1.3.1

parents 8216050c fc85b1fb
Branches upstream
Tags upstream/1.3.1
No related merge requests found
# Change Log
## 1.3.1 - 2024-03-15
- Made nullable parameter types explicit (PHP 8.4 compatibility)
## 1.3.0 - 2024-01-04
### Fixed
......
......@@ -22,7 +22,7 @@ final class FulfilledPromise implements Promise
$this->result = $result;
}
public function then(callable $onFulfilled = null, callable $onRejected = null)
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
{
if (null === $onFulfilled) {
return $this;
......
......@@ -41,7 +41,7 @@ interface Promise
*
* @return Promise a new resolved promise with value of the executed callback (onFulfilled / onRejected)
*/
public function then(callable $onFulfilled = null, callable $onRejected = null);
public function then(?callable $onFulfilled = null, ?callable $onRejected = null);
/**
* Returns the state of the promise, one of PENDING, FULFILLED or REJECTED.
......
......@@ -19,7 +19,7 @@ final class RejectedPromise implements Promise
$this->exception = $exception;
}
public function then(callable $onFulfilled = null, callable $onRejected = null)
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
{
if (null === $onRejected) {
return $this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment