File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
99## [ Unreleased]
1010
11+ With this release the promise ` wait ` function will wait for requests to complete using
12+ [ ` react/async ` 's ` await ` ] ( https://reactphp.org/async/#await ) utilizing fibers. Instead of constantly
13+ start stopping the event loop. As such users are expected to run usage of this adapter in a fiber using
14+ [ ` react/async ` 's ` async ` ] ( https://reactphp.org/async/#async ) like:
15+
16+ ``` php
17+ use function React\Async\async;
18+
19+ async(static function () {
20+ // Returns a Http\Promise\Promise
21+ $promise = $adapter->sendAsyncRequest(request);
22+
23+ // Returns a Psr\Http\Message\ResponseInterface
24+ $response = $promise->wait();
25+ })();
26+ ```
27+
1128### Changed
1229
1330- Use PHP 8.1 fibers as async mechanism.
1431- Detect supported PHP versions in range during CI instead of hardcoding them.
1532
16- ### Changed
17-
1833## [ 3.0.1] - 2021-10-20
1934
2035### Changed
You can’t perform that action at this time.
0 commit comments