Skip to content

v2.5.0

Compare
Choose a tag to compare
@jsor jsor released this 22 Dec 14:11
· 256 commits to 3.x since this release
v2.5.0
2760f38
  • 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).