Releases: php-http/react-adapter
Releases · php-http/react-adapter
4.0.0
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
3.0.0
2.3.0
2.2.0
2.1.0
2.0.0
Release 1.0.0
No changes since v0.3.0.
See change log for all changes
Update dependencies
Using stable version of php-http/discovery
Updated discovery dependency
v0.2.0 Update CHANGELOG.md