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
8
8
9
9
## [ Unreleased]
10
10
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
+
11
28
### Changed
12
29
13
30
- Use PHP 8.1 fibers as async mechanism.
14
31
- Detect supported PHP versions in range during CI instead of hardcoding them.
15
32
16
- ### Changed
17
-
18
33
## [ 3.0.1] - 2021-10-20
19
34
20
35
### Changed
You can’t perform that action at this time.
0 commit comments