packagist react/promise v2.5.0

latest releases: v3.3.0, v3.2.0, v3.1.0...
9 years ago
  • Revert automatic cancellation of pending collection promises once the output promise resolves. This was introduced in 42d86b7 (PR #36, released in v2.3.0) and was both unintended and backward incompatible.

    If you need automatic cancellation, you can use something like:

    function allAndCancel(array $promises)
    {
         return \React\Promise\all($promises)
             ->always(function() use ($promises) {
                 foreach ($promises as $promise) {
                     if ($promise instanceof \React\Promise\CancellablePromiseInterface) {
                         $promise->cancel();
                     }
                 }
            });
    }
  • all() and map() functions now preserve the order of the array (#77).

  • Fix circular references when resolving a promise with itself (#71).

Don't miss a new promise release

NewReleases is sending notifications on new releases.