Repository navigation
3.0.0
- Now requires PHP 5.5!
Promise::all()is moved toPromise\all().- Aside from the
Promise\all()function, there's now alsoPromise\race(). Promise\reject()andPromise\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::errortoPromise::otherwiseto be consistent with
ReactPHP and Guzzle. Theerrormethod 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 anythen/otherwisecallbacks 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.