File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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 * ;
You can’t perform that action at this time.
0 commit comments