Skip to content

3.0.0

Compare
Choose a tag to compare
@evert evert released this 05 Nov 20:20
· 187 commits to master since this release
  • Now requires PHP 5.5!
  • Promise::all() is moved to Promise\all().
  • Aside from the Promise\all() function, there's now also Promise\race().
  • Promise\reject() and Promise\resolve() have also been added.
  • Now 100% compatible with the Ecmascript 6 Promise.

Also contains all the changes from the previous alpha:

  • #26: Added an event loop implementation. Also knows as the Reactor Pattern.
  • Renamed Promise::error to Promise::otherwise to be consistent with
    ReactPHP and Guzzle. The error method is kept for BC but will be removed
    in a future version.
  • #27: Support for Promise-based coroutines via the Sabre\Event\coroutine
    function.
  • BC Break: Promises now use the EventLoop to run "then"-events in a separate
    execution context. In practise that means you need to run the event loop to
    wait for any then/otherwise callbacks to trigger.
  • Promises now have a wait() method. Allowing you to make a promise
    synchronous and simply wait for a result (or exception) to happen.