All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
With this release the promise wait function will wait for requests to complete using
react/async's await utilizing fibers. Instead of constantly
start stopping the event loop. As such users are expected to run usage of this adapter in a fiber using
react/async's async like:
use function React\Async\async;
async(static function () {
// Returns a Http\Promise\Promise
$promise = $adapter->sendAsyncRequest(request);
// Returns a Psr\Http\Message\ResponseInterface
$response = $promise->wait();
})();Another major change in this release is that you no longer inject the event loop into the client. It now only uses the global loop accessor. This ensures the same event loop is used everywhere and makes creating the client a bit simpler:
use Http\Adapter\React\ReactFactory;
$reactHttp = ReactFactory::buildHttpClient();- Removed injecting of the event loop and fully switched to using the global loop accessor (
Loop::get()) - Use PHP 8.1 fibers as async mechanism.
- Detect supported PHP versions in range during CI instead of hardcoding them.
- Replaced EventFactory::create with Loop::get as the factory has been deprecated.
- Add full PSR-18 support.
- Work with HTTPlug 2, drop HTTPlug 1 support.
- Move to
react/httplibrary instead ofreact/http-client.
- Allow installation with react dns 1.0
- Drop unmaintained PHP version support
2.2.0 - 2018-11-03
- React HTTP 0.5 BC break
2.1.0 - 2017-12-21
- Added compatibility with
react/http-clientv0.5 (compatibility with v0.4 kept) ReactFactory::buildHttpClientnow accepts a\React\Socket\ConnectorInterface(only forreact/http-clientv0.5). If none provided, will use React HTTP Client defaults.
- Passing a
\React\Dns\Resolver\ResolvertoReactFactory::buildHttpClientis deprecated and will be removed in 3.0.0. To control connector behavior (DNS, timeout, etc), pass a\React\Socket\ConnectorInterfaceinstead.
2.0.0 - 2017-09-18
- Promise adapter is internal and not extendable [BC Break]
- Promise adapter rewrote to handle chain operation
1.0.0 - 2017-07-08
- Tests update to last version
0.3.0 - 2016-11-07
- Client now require a Stream factory to handle body properly.
- Issue with
react/http-clientv0.4.13 about body handling as StreamInterface. This change was introduce in reactphp/http-client#66.
0.2.2 - 2016-07-18
- Client now requires a Response factory instead of a Message factory
0.2.1 - 2016-07-18
- Updated discovery dependency
0.2.0 - 2016-06-28
- Updated discovery dependency
0.1.1 - 2016-03-08
- Incorrect variable assignment causing impossible to pass custom client and loop
- Initial release