Skip to content

Commit

Permalink
Merge pull request #261 from SimonFrings/stacktrace
Browse files Browse the repository at this point in the history
Update test suite to improve PHP 8.4+ support
  • Loading branch information
WyriHaximus authored May 22, 2024
2 parents 9dcf6c6 + 892ba78 commit 93d0c05
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/FunctionAnyTestRejectedShouldReportUnhandled.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ any([
--EXPECTF--
Unhandled promise rejection with React\Promise\Exception\CompositeException: All promises rejected. in %s:%d
Stack trace:
#0 %s/src/Promise.php(%d): React\Promise\{closure}(%S)
#0 %s/src/Promise.php(%d): %S{closure%S}(%S)
#1 %s/src/Promise.php(%d): React\Promise\Promise->call(%S)
#2 %s/src/functions.php(%d): React\Promise\Promise->__construct(%S)
#3 %s(%d): React\Promise\any(%S)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ reject(new RuntimeException('foo'))->finally(function (): void {
--EXPECTF--
Unhandled promise rejection with RuntimeException: Finally! in %s:%d
Stack trace:
#0 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
#1 %s/src/Internal/RejectedPromise.php(%d): React\Promise\Internal\RejectedPromise->React\Promise\Internal\{closure}(%S)
#0 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
#1 %s/src/Internal/RejectedPromise.php(%d): React\Promise\Internal\RejectedPromise->%S{closure%S}(%S)
#2 %s/src/Internal/RejectedPromise.php(%d): React\Promise\Internal\RejectedPromise->then(%S)
#3 %s(%d): React\Promise\Internal\RejectedPromise->finally(%S)
#4 %A{main}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ reject(new RuntimeException('foo'))->then(null, function () {
--EXPECTF--
Unhandled promise rejection with RuntimeException: bar in %s:%d
Stack trace:
#0 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
#0 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
#1 %s(%d): React\Promise\Internal\RejectedPromise->then(%S)
#2 %A{main}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ reject(new RuntimeException('foo'))->then(null, function (UnexpectedValueExcepti

?>
--EXPECTF--
Unhandled promise rejection with TypeError: {closure}(): Argument #1 ($unexpected) must be of type UnexpectedValueException, RuntimeException given, called in %s/src/Internal/RejectedPromise.php on line %d in %s:%d
Unhandled promise rejection with TypeError: {closure%S}(): Argument #1 ($unexpected) must be of type UnexpectedValueException, RuntimeException given, called in %s/src/Internal/RejectedPromise.php on line %d in %s:%d
Stack trace:
#0 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
#0 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
#1 %s(%d): React\Promise\Internal\RejectedPromise->then(%S)
#2 %A{main}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ echo 'NEVER';
--EXPECTF--
Fatal error: Uncaught OverflowException from unhandled promise rejection handler: This function should never throw in %s:%d
Stack trace:
#0 [internal function]: {closure}(%S)
#0 [internal function]: {closure%S}(%S)
#1 %s(%d): trigger_error(%S)
#2 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
#2 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
#3 %s/src/functions.php(%d): React\Promise\Internal\RejectedPromise->__destruct()
#4 %s(%d): React\Promise\reject(%S)
#5 %A{main}

0 comments on commit 93d0c05

Please sign in to comment.