Reactphp Promise Versions Save

Promises/A implementation for PHP.

v1.0.3

5 years ago
  • Add PromisorInterface for objects that have a promise() method.

v1.0.2

5 years ago
  • Fix bug in When::any() not correctly unwrapping to a single result value
  • $promiseOrValue argument of When::resolve() and When::reject() is now optional

v1.0.1

5 years ago
  • Prevent deep recursion which was reaching xdebug.max_nesting_level default of 100

v1.0.0

5 years ago
  • First tagged release

v2.6.0

5 years ago
  • Feature: Significantly improve memory consumption and performance by only passing resolver args to resolver and canceller if callback requires them. Also use static callbacks without binding to promise, clean up canceller function reference when they are no longer needed and hide resolver and canceller references from call stack on PHP 7+. (#113, #115, #116, #117, #118, #119 and #123 by @clue)

    These changes combined mean that rejecting promises with an Exception should no longer cause any internal circular references which could cause some unexpected memory growth in previous versions. By explicitly avoiding and explicitly cleaning up said references, we can avoid relying on PHP's circular garbage collector to kick in which significantly improves performance when rejecting many promises.

  • Mark legacy progress support / notification API as deprecated (#112 by @clue)

  • Recommend rejecting promises by throwing an exception (#114 by @jsor)

  • Improve documentation to properly instantiate LazyPromise (#121 by @holtkamp)

  • Follower cancellation propagation was originally planned for this release but has been reverted for now and is planned for a future release. (#99 by @jsor and #122 by @clue)

v2.5.1

7 years ago
  • Fix circular references when resolving with a promise which follows itself (#94).

v2.5.0

7 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).

v2.4.1

8 years ago
  • Fix some() not cancelling pending promises when too much input promises reject (16ff799).

v2.3.0

8 years ago
  • Allow cancellation of promises returned by functions working on promise collections (#36).
  • Handle \Throwable in the same way as \Exception (#51 by @joshdifabio).

v2.4.0

8 years ago
  • Support foreign thenables in resolve(). Any object that provides a then() method is now assimilated to a trusted promise that follows the state of this thenable (#52).
  • Fix some() and any() for input arrays containing not enough items (#34).