function PromiseInterface::always
[Deprecated] Allows you to execute "cleanup" type tasks in a promise chain.
This method continues to exist only for BC reasons and to ease upgrading between versions. It is an alias for:
```php $promise->finally($onFulfilledOrRejected); ```
Parameters
callable(): (void|PromiseInterface<void>) $onFulfilledOrRejected:
Return value
PromiseInterface<T>
Deprecated
3.0.0 Use finally() instead
See also
3 methods override PromiseInterface::always()
- FulfilledPromise::always in vendor/
react/ promise/ src/ Internal/ FulfilledPromise.php - Promise::always in vendor/
react/ promise/ src/ Promise.php - RejectedPromise::always in vendor/
react/ promise/ src/ Internal/ RejectedPromise.php
File
-
vendor/
react/ promise/ src/ PromiseInterface.php, line 151
Class
- PromiseInterface
- @template-covariant T
Namespace
React\PromiseCode
public function always(callable $onFulfilledOrRejected) : PromiseInterface;