2.0.0 RC1
Pre-release
Pre-release
This is a release candidate for Amp v2.0.0. Please test it carefully and provide any feedback you have.
Amp\reactor()
has been replaced withAmp\Loop::set()
andAmp\Loop::get()
.Amp\driver()
has been replaced withAmp\Loop\Factory::create()
.Amp\tick()
no longer exists and doesn't have a replacement. Ticks are an internal detail.- Functions for creating and managing watchers are now static methods of
Amp\Loop
instead of functions in theAmp
namespace.once()
is nowdelay()
andimmediately()
isdefer()
.- Parameter order for
delay()
andrepeat()
has been changed. reference()
andunreference()
have been added.
Amp\Pause
has been renamed toAmp\Delayed
and accepts an optional resolution value now. Additionallyreference()
andunreference()
methods have been added.- Promise accepting functions have been moved to the
Amp\Promise
namespace. Amp\Promise\some()
accepts an additional$required
parameter.Amp\call()
,Amp\asyncCall()
,Amp\coroutine()
andAmp\asyncCoroutine()
have been added.Amp\resolve()
has been removed, useAmp\call()
instead.Promise::when()
has been renamed toPromise::onResolve()
Promise::watch()
has been removed, useAmp\Iterator
,amphp/byte-stream
or a custom implementation that implementsAmp\Promise
instead and provides dedicated APIs to access the previously data shared via thewatch()
mechanism.Amp\Iterator
,Amp\Emitter
andAmp\Producer
have been added with several functions in theAmp\Iterator
namespace.- Various other changes.