|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## 1.0.0 (2020-07-11) |
| 4 | + |
| 5 | +A major new feature release, see [**release announcement**](https://clue.engineering/2020/announcing-reactphp-http). |
| 6 | + |
| 7 | +* First stable LTS release, now following [SemVer](https://semver.org/). |
| 8 | + We'd like to emphasize that this component is production ready and battle-tested. |
| 9 | + We plan to support all long-term support (LTS) releases for at least 24 months, |
| 10 | + so you have a rock-solid foundation to build on top of. |
| 11 | + |
| 12 | +This update involves some major new features and a number of BC breaks due to |
| 13 | +some necessary API cleanup. We've tried hard to avoid BC breaks where possible |
| 14 | +and minimize impact otherwise. We expect that most consumers of this package |
| 15 | +will be affected by BC breaks, but updating should take no longer than a few |
| 16 | +minutes. See below for more details: |
| 17 | + |
| 18 | +* Feature: Add async HTTP client implementation. |
| 19 | + (#368 by @clue) |
| 20 | + |
| 21 | + ```php |
| 22 | + $browser = new React\Http\Browser($loop); |
| 23 | + $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) { |
| 24 | + echo $response->getBody(); |
| 25 | + }); |
| 26 | + ``` |
| 27 | + |
| 28 | + The code has been imported as-is from [clue/reactphp-buzz v2.9.0](https://github.com/clue/reactphp-buzz), |
| 29 | + with only minor changes to the namespace and we otherwise leave all the existing APIs unchanged. |
| 30 | + Upgrading from [clue/reactphp-buzz v2.9.0](https://github.com/clue/reactphp-buzz) |
| 31 | + to this release should be a matter of updating some namespace references only: |
| 32 | + |
| 33 | + ```php |
| 34 | + // old |
| 35 | + $browser = new Clue\React\Buzz\Browser($loop); |
| 36 | + |
| 37 | + // new |
| 38 | + $browser = new React\Http\Browser($loop); |
| 39 | + ``` |
| 40 | + |
| 41 | +* Feature / BC break: Add `LoopInterface` as required first constructor argument to `Server` and |
| 42 | + change `Server` to accept variadic middleware handlers instead of `array`. |
| 43 | + (#361 and #362 by @WyriHaximus) |
| 44 | + |
| 45 | + ```php |
| 46 | + // old |
| 47 | + $server = new React\Http\Server($handler); |
| 48 | + $server = new React\Http\Server([$middleware, $handler]); |
| 49 | + |
| 50 | + // new |
| 51 | + $server = new React\Http\Server($loop, $handler); |
| 52 | + $server = new React\Http\Server($loop, $middleware, $handler); |
| 53 | + ``` |
| 54 | + |
| 55 | +* Feature / BC break: Move `Response` class to `React\Http\Message\Response` and |
| 56 | + expose `ServerRequest` class to `React\Http\Message\ServerRequest`. |
| 57 | + (#370 by @clue) |
| 58 | + |
| 59 | + ```php |
| 60 | + // old |
| 61 | + $response = new React\Http\Response(200, [], 'Hello!'); |
| 62 | + |
| 63 | + // new |
| 64 | + $response = new React\Http\Message\Response(200, [], 'Hello!'); |
| 65 | + ``` |
| 66 | + |
| 67 | +* Feature / BC break: Add `StreamingRequestMiddleware` to stream incoming requests, mark `StreamingServer` as internal. |
| 68 | + (#367 by @clue) |
| 69 | + |
| 70 | + ```php |
| 71 | + // old: advanced StreamingServer is now internal only |
| 72 | + $server = new React\Http\StreamingServer($handler); |
| 73 | + |
| 74 | + // new: use StreamingRequestMiddleware instead of StreamingServer |
| 75 | + $server = new React\Http\Server( |
| 76 | + $loop, |
| 77 | + new React\Http\Middleware\StreamingRequestMiddleware(), |
| 78 | + $handler |
| 79 | + ); |
| 80 | + ``` |
| 81 | + |
| 82 | +* Feature / BC break: Improve default concurrency to 1024 requests and cap default request buffer at 64K. |
| 83 | + (#371 by @clue) |
| 84 | + |
| 85 | + This improves default concurrency to 1024 requests and caps the default request buffer at 64K. |
| 86 | + The previous defaults resulted in just 4 concurrent requests with a request buffer of 8M. |
| 87 | + See [`Server`](../README.md#server) for details on how to override these defaults. |
| 88 | + |
| 89 | +* Feature: Expose ReactPHP in `User-Agent` client-side request header and in `Server` server-side response header. |
| 90 | + (#374 by @clue) |
| 91 | + |
| 92 | +* Mark all classes as `final` to discourage inheriting from it. |
| 93 | + (#373 by @WyriHaximus) |
| 94 | + |
| 95 | +* Improve documentation and use fully-qualified class names throughout the documentation and |
| 96 | + add ReactPHP core team as authors to `composer.json` and license file. |
| 97 | + (#366 and #369 by @WyriHaximus and #375 by @clue) |
| 98 | + |
| 99 | +* Improve test suite and support skipping all online tests with `--exclude-group internet`. |
| 100 | + (#372 by @clue) |
| 101 | + |
3 | 102 | ## 0.8.7 (2020-07-05)
|
4 | 103 |
|
5 | 104 | * Fix: Fix parsing multipart request body with quoted header parameters (dot net).
|
|
0 commit comments