|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## 0.8.0 (2017-12-12) |
| 4 | + |
| 5 | +* Feature / BC break: Add new `Server` facade that buffers and parses incoming |
| 6 | + HTTP requests. This provides full PSR-7 compatibility, including support for |
| 7 | + form submissions with POST fields and file uploads. |
| 8 | + The old `Server` has been renamed to `StreamingServer` for advanced usage |
| 9 | + and is used internally. |
| 10 | + (#266, #271, #281, #282, #283 and #284 by @WyriHaximus and @clue) |
| 11 | + |
| 12 | + ```php |
| 13 | + // old: handle incomplete/streaming requests |
| 14 | + $server = new Server($handler); |
| 15 | + |
| 16 | + // new: handle complete, buffered and parsed requests |
| 17 | + // new: full PSR-7 support, including POST fields and file uploads |
| 18 | + $server = new Server($handler); |
| 19 | + |
| 20 | + // new: handle incomplete/streaming requests |
| 21 | + $server = new StreamingServer($handler); |
| 22 | + ``` |
| 23 | + |
| 24 | + > While this is technically a small BC break, this should in fact not break |
| 25 | + most consuming code. If you rely on the old request streaming, you can |
| 26 | + explicitly use the advanced `StreamingServer` to restore old behavior. |
| 27 | + |
| 28 | +* Feature: Add support for middleware request handler arrays |
| 29 | + (#215, #228, #229, #236, #237, #238, #246, #247, #277, #279 and #285 by @WyriHaximus, @clue and @jsor) |
| 30 | + |
| 31 | + ```php |
| 32 | + // new: middleware request handler arrays |
| 33 | + $server = new Server(array( |
| 34 | + function (ServerRequestInterface $request, callable $next) { |
| 35 | + $request = $request->withHeader('Processed', time()); |
| 36 | + return $next($request); |
| 37 | + }, |
| 38 | + function (ServerRequestInterface $request) { |
| 39 | + return new Response(); |
| 40 | + } |
| 41 | + )); |
| 42 | + ``` |
| 43 | + |
| 44 | +* Feature: Add support for limiting how many next request handlers can be |
| 45 | + executed concurrently (`LimitConcurrentRequestsMiddleware`) |
| 46 | + (#272 by @clue and @WyriHaximus) |
| 47 | + |
| 48 | + ```php |
| 49 | + // new: explicitly limit concurrency |
| 50 | + $server = new Server(array( |
| 51 | + new LimitConcurrentRequestsMiddleware(10), |
| 52 | + $handler |
| 53 | + )); |
| 54 | + ``` |
| 55 | + |
| 56 | +* Feature: Add support for buffering the incoming request body |
| 57 | + (`RequestBodyBufferMiddleware`). |
| 58 | + This feature mimics PHP's default behavior and respects its `post_max_size` |
| 59 | + ini setting by default and allows explicit configuration. |
| 60 | + (#216, #224, #263, #276 and #278 by @WyriHaximus and #235 by @andig) |
| 61 | + |
| 62 | + ```php |
| 63 | + // new: buffer up to 10 requests with 8 MiB each |
| 64 | + $server = new StreamingServer(array( |
| 65 | + new LimitConcurrentRequestsMiddleware(10), |
| 66 | + new RequestBodyBufferMiddleware('8M'), |
| 67 | + $handler |
| 68 | + )); |
| 69 | + ``` |
| 70 | + |
| 71 | +* Feature: Add support for parsing form submissions with POST fields and file |
| 72 | + uploads (`RequestBodyParserMiddleware`). |
| 73 | + This feature mimics PHP's default behavior and respects its ini settings and |
| 74 | + `MAX_FILE_SIZE` POST fields by default and allows explicit configuration. |
| 75 | + (#220, #226, #252, #261, #264, #265, #267, #268, #274 by @WyriHaximus and @clue) |
| 76 | + |
| 77 | + ```php |
| 78 | + // new: buffer up to 10 requests with 8 MiB each |
| 79 | + // and limit to 4 uploads with 2 MiB each |
| 80 | + $server = new StreamingServer(array( |
| 81 | + new LimitConcurrentRequestsMiddleware(10), |
| 82 | + new RequestBodyBufferMiddleware('8M'), |
| 83 | + new RequestBodyParserMiddleware('2M', 4) |
| 84 | + $handler |
| 85 | + )); |
| 86 | + ``` |
| 87 | + |
| 88 | +* Feature: Update Socket to work around sending secure HTTPS responses with PHP < 7.1.4 |
| 89 | + (#244 by @clue) |
| 90 | + |
| 91 | +* Feature: Support sending same response header multiple times (e.g. `Set-Cookie`) |
| 92 | + (#248 by @clue) |
| 93 | + |
| 94 | +* Feature: Raise maximum request header size to 8k to match common implementations |
| 95 | + (#253 by @clue) |
| 96 | + |
| 97 | +* Improve test suite by adding forward compatibility with PHPUnit 6, test |
| 98 | + against PHP 7.1 and PHP 7.2 and refactor and remove risky and duplicate tests. |
| 99 | + (#243, #269 and #270 by @carusogabriel and #249 by @clue) |
| 100 | + |
| 101 | +* Minor code refactoring to move internal classes to `React\Http\Io` namespace |
| 102 | + and clean up minor code and documentation issues |
| 103 | + (#251 by @clue, #227 by @kalessil, #240 by @christoph-kluge, #230 by @jsor and #280 by @andig) |
| 104 | + |
3 | 105 | ## 0.7.4 (2017-08-16)
|
4 | 106 |
|
5 | 107 | * Improvement: Target evenement 3.0 a long side 2.0 and 1.0
|
|
0 commit comments