- Resolution methods are now hidden in the `Promise` returned from `Deferred::promise()`. Their exposure was an implementation detail and never promised by the return type of `Deferred::promise()`.
- A named class is now used for promises, so you don't end up with an anonymous class in `var_dump()` and stack traces, which can be confusing.
- Fixed possible notices in `formatStacktrace()`. This is an internal API, but the notices might appear on certain stack traces when running with `AMP_DEBUG=true`.
- Fixed segfault with `ev`, see amphp/parallel-functions#3.
- Dropped multiple definitions of `Deferred` and `Emitter`. These were introduced as performance hack, but relied on `zend.assertions` being disabled to change behavior, which is bad. The performance impact is believed to be rather low, because coroutines are used a lot more than `Deferred` in Amp v2.
-`Loop::set()` replaces the current driver with a dummy driver for the time of `gc_collect_cycles()` now. This allows cyclic references to be cleaned up properly before the new driver is set. Without such a fix, cyclic references might have been cleaned up later, e.g. cancelling their watcher IDs on the new loop, thereby cancelling the wrong watchers.
*`Amp\reactor()` has been replaced with `Amp\Loop::set()` and `Amp\Loop::get()`.
*`Amp\driver()` has been replaced with `Amp\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 the `Amp` namespace.
*`once()` is now `delay()` and `immediately()` is `defer()`.
* Parameter order for `delay()` and `repeat()` has been changed.
*`reference()` and `unreference()` have been added.
*`Amp\Pause` has been renamed to `Amp\Delayed` and accepts an optional resolution value now. Additionally `reference()` and `unreference()` 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()` and `Amp\asyncCoroutine()` have been added.
*`Amp\resolve()` has been removed, use `Amp\call()` instead.
*`Promise::when()` has been renamed to `Promise::onResolve()`
*`Promise::watch()` has been removed, use `Amp\Iterator`, [`amphp/byte-stream`](https://github.com/amphp/byte-stream) or a custom implementation that implements `Amp\Promise` instead and provides dedicated APIs to access the previously data shared via the `watch()` mechanism.
*`Amp\Iterator`, `Amp\Emitter` and `Amp\Producer` have been added with several functions in the `Amp\Iterator` namespace.