Skip to content

Commit 9cdbd96

Browse files
authored
Merge branch 'master' into psalm
2 parents 5371209 + 29ac803 commit 9cdbd96

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/Internal/Transport/CompletableResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ public function cancel(): void
110110
}
111111

112112
/**
113-
* @deprecated
113+
* @deprecated use {@see catch()} instead
114114
*/
115115
public function otherwise(callable $onRejected): PromiseInterface
116116
{
117117
return $this->catch($onRejected);
118118
}
119119

120120
/**
121-
* @deprecated
121+
* @deprecated use {@see finally()} instead
122122
*/
123123
public function always(callable $onFulfilledOrRejected): PromiseInterface
124124
{

src/Internal/Workflow/Process/Scope.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,17 @@ public function finally(callable $onFulfilledOrRejected): PromiseInterface
259259
return $this->deferred->promise()->finally($onFulfilledOrRejected);
260260
}
261261

262+
/**
263+
* @deprecated use {@see catch()} instead
264+
*/
262265
public function otherwise(callable $onRejected): PromiseInterface
263266
{
264267
return $this->catch($onRejected);
265268
}
266269

270+
/**
271+
* @deprecated use {@see finally()} instead
272+
*/
267273
public function always(callable $onFulfilledOrRejected): PromiseInterface
268274
{
269275
return $this->finally($onFulfilledOrRejected);

src/Workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ public static function newUntypedExternalWorkflowStub(WorkflowExecution $executi
901901
* ->then(function ($result) {
902902
* // Execution result
903903
* })
904-
* ->otherwise(function (\Throwable $error) {
904+
* ->catch(function (\Throwable $error) {
905905
* // Execution error
906906
* })
907907
* ;

0 commit comments

Comments
 (0)