Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PromiseInterface.php

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

self::finally()

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\Promise

Code

public function always(callable $onFulfilledOrRejected) : PromiseInterface;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal