|  | 
| 1 | 1 | # Changelog | 
| 2 | 2 | 
 | 
|  | 3 | +## 1.6.0 (2022-02-03) | 
|  | 4 | + | 
|  | 5 | +*   Feature: Add factory methods for common HTML/JSON/plaintext/XML response types. | 
|  | 6 | +    (#439 by @clue) | 
|  | 7 | + | 
|  | 8 | +    ```php | 
|  | 9 | +    $response = React\Http\Response\html("<h1>Hello wörld!</h1>\n"); | 
|  | 10 | +    $response = React\Http\Response\json(['message' => 'Hello wörld!']); | 
|  | 11 | +    $response = React\Http\Response\plaintext("Hello wörld!\n"); | 
|  | 12 | +    $response = React\Http\Response\xml("<message>Hello wörld!</message>\n"); | 
|  | 13 | +    $response = React\Http\Response\redirect('https://reactphp.org/'); | 
|  | 14 | +    ``` | 
|  | 15 | + | 
|  | 16 | +*   Feature: Expose all status code constants via `Response` class. | 
|  | 17 | +    (#432 by @clue) | 
|  | 18 | + | 
|  | 19 | +    ```php | 
|  | 20 | +    $response = new React\Http\Message\Response( | 
|  | 21 | +        React\Http\Message\Response::STATUS_OK, // 200 OK | 
|  | 22 | +        … | 
|  | 23 | +    ); | 
|  | 24 | +    $response = new React\Http\Message\Response( | 
|  | 25 | +        React\Http\Message\Response::STATUS_NOT_FOUND, // 404 Not Found | 
|  | 26 | +        … | 
|  | 27 | +    ); | 
|  | 28 | +    ``` | 
|  | 29 | + | 
|  | 30 | +*   Feature: Full support for PHP 8.1 release. | 
|  | 31 | +    (#433 by @SimonFrings and #434 by @clue) | 
|  | 32 | + | 
|  | 33 | +*   Feature / Fix: Improve protocol handling for HTTP responses with no body. | 
|  | 34 | +    (#429 and #430 by @clue) | 
|  | 35 | + | 
|  | 36 | +*   Internal refactoring and internal improvements for handling requests and responses. | 
|  | 37 | +    (#422 by @WyriHaximus and #431 by @clue) | 
|  | 38 | + | 
|  | 39 | +*   Improve documentation, update proxy examples, include error reporting in examples. | 
|  | 40 | +    (#420, #424, #426, and #427 by @clue) | 
|  | 41 | + | 
|  | 42 | +*   Update test suite to use default loop. | 
|  | 43 | +    (#438 by @clue) | 
|  | 44 | + | 
|  | 45 | +## 1.5.0 (2021-08-04) | 
|  | 46 | + | 
|  | 47 | +*   Feature: Update `Browser` signature to take optional `$connector` as first argument and | 
|  | 48 | +    to match new Socket API without nullable loop arguments. | 
|  | 49 | +    (#418 and #419 by @clue) | 
|  | 50 | + | 
|  | 51 | +    ```php | 
|  | 52 | +    // unchanged | 
|  | 53 | +    $browser = new React\Http\Browser(); | 
|  | 54 | + | 
|  | 55 | +    // deprecated | 
|  | 56 | +    $browser = new React\Http\Browser(null, $connector); | 
|  | 57 | +    $browser = new React\Http\Browser($loop, $connector); | 
|  | 58 | + | 
|  | 59 | +    // new | 
|  | 60 | +    $browser = new React\Http\Browser($connector); | 
|  | 61 | +    $browser = new React\Http\Browser($connector, $loop); | 
|  | 62 | +    ``` | 
|  | 63 | + | 
|  | 64 | +*   Feature: Rename `Server` to `HttpServer` to avoid class name collisions and | 
|  | 65 | +    to avoid any ambiguities with regards to the new `SocketServer` API. | 
|  | 66 | +    (#417 and #419 by @clue) | 
|  | 67 | + | 
|  | 68 | +    ```php | 
|  | 69 | +    // deprecated | 
|  | 70 | +    $server = new React\Http\Server($handler); | 
|  | 71 | +    $server->listen(new React\Socket\Server(8080)); | 
|  | 72 | + | 
|  | 73 | +    // new | 
|  | 74 | +    $http = new React\Http\HttpServer($handler); | 
|  | 75 | +    $http->listen(new React\Socket\SocketServer('127.0.0.1:8080')); | 
|  | 76 | +    ``` | 
|  | 77 | + | 
|  | 78 | +## 1.4.0 (2021-07-11) | 
|  | 79 | + | 
|  | 80 | +A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop). | 
|  | 81 | + | 
|  | 82 | +*   Feature: Simplify usage by supporting new [default loop](https://reactphp.org/event-loop/#loop). | 
|  | 83 | +    (#410 by @clue) | 
|  | 84 | + | 
|  | 85 | +    ```php | 
|  | 86 | +    // old (still supported) | 
|  | 87 | +    $browser = new React\Http\Browser($loop); | 
|  | 88 | +    $server = new React\Http\Server($loop, $handler); | 
|  | 89 | + | 
|  | 90 | +    // new (using default loop) | 
|  | 91 | +    $browser = new React\Http\Browser(); | 
|  | 92 | +    $server = new React\Http\Server($handler); | 
|  | 93 | +    ``` | 
|  | 94 | + | 
|  | 95 | +## 1.3.0 (2021-04-11) | 
|  | 96 | + | 
|  | 97 | +*   Feature: Support persistent connections (`Connection: keep-alive`). | 
|  | 98 | +    (#405 by @clue) | 
|  | 99 | + | 
|  | 100 | +    This shows a noticeable performance improvement especially when benchmarking | 
|  | 101 | +    using persistent connections (which is the default pretty much everywhere). | 
|  | 102 | +    Together with other changes in this release, this improves benchmarking | 
|  | 103 | +    performance by around 100%. | 
|  | 104 | + | 
|  | 105 | +*   Feature: Require `Host` request header for HTTP/1.1 requests. | 
|  | 106 | +    (#404 by @clue) | 
|  | 107 | + | 
|  | 108 | +*   Minor documentation improvements. | 
|  | 109 | +    (#398 by @fritz-gerneth and #399 and #400 by @pavog) | 
|  | 110 | + | 
|  | 111 | +*   Improve test suite, use GitHub actions for continuous integration (CI). | 
|  | 112 | +    (#402 by @SimonFrings) | 
|  | 113 | + | 
|  | 114 | +## 1.2.0 (2020-12-04) | 
|  | 115 | + | 
|  | 116 | +*   Feature: Keep request body in memory also after consuming request body. | 
|  | 117 | +    (#395 by @clue) | 
|  | 118 | + | 
|  | 119 | +    This means consumers can now always access the complete request body as | 
|  | 120 | +    detailed in the documentation. This allows building custom parsers and more | 
|  | 121 | +    advanced processing models without having to mess with the default parsers. | 
|  | 122 | + | 
|  | 123 | +## 1.1.0 (2020-09-11) | 
|  | 124 | + | 
|  | 125 | +*   Feature: Support upcoming PHP 8 release, update to reactphp/socket v1.6 and adjust type checks for invalid chunk headers. | 
|  | 126 | +    (#391 by @clue) | 
|  | 127 | + | 
|  | 128 | +*   Feature: Consistently resolve base URL according to HTTP specs. | 
|  | 129 | +    (#379 by @clue) | 
|  | 130 | + | 
|  | 131 | +*   Feature / Fix: Expose `Transfer-Encoding: chunked` response header and fix chunked responses for `HEAD` requests. | 
|  | 132 | +    (#381 by @clue) | 
|  | 133 | + | 
|  | 134 | +*   Internal refactoring to remove unneeded `MessageFactory` and `Response` classes. | 
|  | 135 | +    (#380 and #389 by @clue) | 
|  | 136 | + | 
|  | 137 | +*   Minor documentation improvements and improve test suite, update to support PHPUnit 9.3. | 
|  | 138 | +    (#385 by @clue and #393 by @SimonFrings) | 
|  | 139 | + | 
| 3 | 140 | ## 1.0.0 (2020-07-11) | 
| 4 | 141 | 
 | 
| 5 | 142 | A major new feature release, see [**release announcement**](https://clue.engineering/2020/announcing-reactphp-http). | 
| @@ -84,7 +221,7 @@ minutes. See below for more details: | 
| 84 | 221 | 
 | 
| 85 | 222 |     This improves default concurrency to 1024 requests and caps the default request buffer at 64K. | 
| 86 | 223 |     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. | 
|  | 224 | +    See [`Server`](README.md#server) for details on how to override these defaults. | 
| 88 | 225 | 
 | 
| 89 | 226 | *   Feature: Expose ReactPHP in `User-Agent` client-side request header and in `Server` server-side response header. | 
| 90 | 227 |     (#374 by @clue) | 
|  | 
0 commit comments