Skip to content

Latest commit

 

History

History
157 lines (90 loc) · 4.07 KB

CHANGELOG.md

File metadata and controls

157 lines (90 loc) · 4.07 KB

Change Log

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.

[4.0.0] - 2022-11-14

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();

Changed

  • 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.

[3.0.1] - 2021-10-20

Changed

  • Replaced EventFactory::create with Loop::get as the factory has been deprecated.

[3.0.0] - 2020-12-17

Changed

  • Add full PSR-18 support.
  • Work with HTTPlug 2, drop HTTPlug 1 support.
  • Move to react/http library instead of react/http-client.

[2.3.0] - 2019-07-30

Changed

  • Allow installation with react dns 1.0
  • Drop unmaintained PHP version support

2.2.0 - 2018-11-03

Fixed

  • React HTTP 0.5 BC break

2.1.0 - 2017-12-21

Changed

  • Added compatibility with react/http-client v0.5 (compatibility with v0.4 kept)
  • ReactFactory::buildHttpClient now accepts a \React\Socket\ConnectorInterface (only for react/http-client v0.5). If none provided, will use React HTTP Client defaults.

Deprecations

  • Passing a \React\Dns\Resolver\Resolver to ReactFactory::buildHttpClient is deprecated and will be removed in 3.0.0. To control connector behavior (DNS, timeout, etc), pass a \React\Socket\ConnectorInterface instead.

2.0.0 - 2017-09-18

Changed

  • Promise adapter is internal and not extendable [BC Break]

Fixed

  • Promise adapter rewrote to handle chain operation

1.0.0 - 2017-07-08

Changed

  • Tests update to last version

0.3.0 - 2016-11-07

Changed

  • Client now require a Stream factory to handle body properly.

Fixed

  • Issue with react/http-client v0.4.13 about body handling as StreamInterface. This change was introduce in reactphp/http-client#66.

0.2.2 - 2016-07-18

Changed

  • Client now requires a Response factory instead of a Message factory

0.2.1 - 2016-07-18

Changed

  • Updated discovery dependency

0.2.0 - 2016-06-28

Changed

  • Updated discovery dependency

0.1.1 - 2016-03-08

Fixed

  • Incorrect variable assignment causing impossible to pass custom client and loop

0.1.0 - 2016-03-02

  • Initial release