|
| 1 | +# Changelog |
| 2 | + |
| 3 | +## 0.16.0 (2024-03-05) |
| 4 | + |
| 5 | +We are thrilled to announce the official release of `v0.16.0` to the public! 🎉🚀 |
| 6 | +Additionally, we are making all previous tagged versions available to simplify the upgrade process. |
| 7 | +In addition to the release of `v0.16.0`, this update includes all prior tagged releases. |
| 8 | + |
| 9 | +This release includes exciting new features such as improved performance, additional options |
| 10 | +for access logging, updates to our documentation and nginx + Apache configurations, |
| 11 | +as well as many more internal improvements to our test suite and integration tests. |
| 12 | + |
| 13 | +* Feature: Improve performance by skipping `AccessLogHandler` if it writes to `/dev/null`. |
| 14 | + (#248 by @clue) |
| 15 | + |
| 16 | +* Feature: Add optional `$path` argument for `AccessLogHandler`. |
| 17 | + (#247 by @clue) |
| 18 | + |
| 19 | +* Minor documentation improvements and update nginx + Apache configuration. |
| 20 | + (#245 and #251 by @clue) |
| 21 | + |
| 22 | +* Improve test suite with improved directory structure for integration tests. |
| 23 | + (#250 by @clue) |
| 24 | + |
| 25 | +## 0.15.0 (2023-12-07) |
| 26 | + |
| 27 | +* Feature: Full PHP 8.3 compatibility. |
| 28 | + (#244 by @clue) |
| 29 | + |
| 30 | +* Feature: Add `App::__invoke()` method to enable custom integrations. |
| 31 | + (#236 by @clue) |
| 32 | + |
| 33 | +* Feature: Improve performance by only using `FiberHandler` for `ReactiveHandler`. |
| 34 | + (#237 by @clue) |
| 35 | + |
| 36 | +* Minor documentation improvements. |
| 37 | + (#242 by @yadaiio) |
| 38 | + |
| 39 | +## 0.14.0 (2023-07-31) |
| 40 | + |
| 41 | +* Feature: Improve Promise v3 support and use Promise v3 template types. |
| 42 | + (#233 and #235 by @clue) |
| 43 | + |
| 44 | +* Feature: Improve handling `OPTIONS *` requests. |
| 45 | + (#226 by @clue) |
| 46 | + |
| 47 | +* Refactor logging into new `LogStreamHandler` and reactive server logic into new `ReactiveHandler`. |
| 48 | + (#222 and #224 by @clue) |
| 49 | + |
| 50 | +* Improve test suite and ensure 100% code coverage. |
| 51 | + (#217, #221, #225 and #228 by @clue) |
| 52 | + |
| 53 | +## 0.13.0 (2023-02-22) |
| 54 | + |
| 55 | +* Feature: Forward compatibility with upcoming Promise v3. |
| 56 | + (#188 by @clue) |
| 57 | + |
| 58 | +* Feature: Full PHP 8.2 compatibility. |
| 59 | + (#194 and #207 by @clue) |
| 60 | + |
| 61 | +* Feature: Load environment variables from `$_ENV`, `$_SERVER` and `getenv()`. |
| 62 | + (#205 by @clue) |
| 63 | + |
| 64 | +* Feature: Update to support `Content-Length` response header on `HEAD` requests. |
| 65 | + (#186 by @clue) |
| 66 | + |
| 67 | +* Feature / Fix: Consistent handling for HTTP responses with multiple header values (PHP SAPI). |
| 68 | + (#214 by @pfk84) |
| 69 | + |
| 70 | +* Fix: Respect explicit response status code when Location response header is given (PHP SAPI). |
| 71 | + (#191 by @jkrzefski) |
| 72 | + |
| 73 | +* Minor documentation improvements. |
| 74 | + (#189 by @clue) |
| 75 | + |
| 76 | +* Add PHPStan to test environment on level `max` and improve type definitions. |
| 77 | + (#200, #201 and #204 by @clue) |
| 78 | + |
| 79 | +* Improve test suite and report failed assertions. |
| 80 | + (#199 by @clue and #208 by @SimonFrings) |
| 81 | + |
| 82 | +## 0.12.0 (2022-08-03) |
| 83 | + |
| 84 | +* Feature: Support loading environment variables from DI container configuration. |
| 85 | + (#184 by @clue) |
| 86 | + |
| 87 | +* Feature: Support typed container variables for container factory functions. |
| 88 | + (#178, #179 and #180 by @clue) |
| 89 | + |
| 90 | +* Feature: Support nullable and `null` arguments and default values for DI container configuration. |
| 91 | + (#181 and #183 by @clue) |
| 92 | + |
| 93 | +* Feature: Support untyped and `mixed` arguments for container factory. |
| 94 | + (#182 by @clue) |
| 95 | + |
| 96 | +## 0.11.0 (2022-07-26) |
| 97 | + |
| 98 | +* Feature: Make `AccessLogHandler` and `ErrorHandler` part of public API. |
| 99 | + (#173 and #174 by @clue) |
| 100 | + |
| 101 | + ```php |
| 102 | + <?php |
| 103 | + |
| 104 | + require __DIR__ . '/../vendor/autoload.php'; |
| 105 | + |
| 106 | + $app = new FrameworkX\App( |
| 107 | + new FrameworkX\AccessLogHandler(), |
| 108 | + new FrameworkX\ErrorHandler() |
| 109 | + ); |
| 110 | + |
| 111 | + // Register routes here, see routing… |
| 112 | + |
| 113 | + $app->run(); |
| 114 | + ``` |
| 115 | + |
| 116 | +* Feature: Support loading `AccessLogHandler` and `ErrorHandler` from `Container`. |
| 117 | + (#175 by @clue) |
| 118 | + |
| 119 | +* Feature: Read `$remote_addr` attribute for `AccessLogHandler` (trusted proxies). |
| 120 | + (#177 by @clue) |
| 121 | + |
| 122 | +* Internal refactoring to move all handlers to `Io` namespace. |
| 123 | + (#176 by @clue) |
| 124 | + |
| 125 | +* Update test suite to remove deprecated `utf8_decode()` (PHP 8.2 preparation). |
| 126 | + (#171 by SimonFrings) |
| 127 | + |
| 128 | +## 0.10.0 (2022-07-14) |
| 129 | + |
| 130 | +* Feature: Built-in support for fibers on PHP 8.1+ with stable reactphp/async. |
| 131 | + (#168 by @clue) |
| 132 | + |
| 133 | + ```php |
| 134 | + $app->get('/book/{isbn}', function (Psr\Http\Message\ServerRequestInterface $request) use ($db) { |
| 135 | + $isbn = $request->getAttribute('isbn'); |
| 136 | + $result = await($db->query( |
| 137 | + 'SELECT title FROM book WHERE isbn = ?', |
| 138 | + [$isbn] |
| 139 | + )); |
| 140 | + |
| 141 | + assert($result instanceof React\MySQL\QueryResult); |
| 142 | + $data = $result->resultRows[0]['title']; |
| 143 | + |
| 144 | + return React\Http\Message\Response::plaintext( |
| 145 | + $data |
| 146 | + ); |
| 147 | + }); |
| 148 | + ``` |
| 149 | + |
| 150 | +* Feature: Support PSR-11 container interface by using DI container as adapter. |
| 151 | + (#163 by @clue) |
| 152 | + |
| 153 | +* Minor documentation improvements. |
| 154 | + (#158 by @clue and #160 by @SimonFrings) |
| 155 | + |
| 156 | +## 0.9.0 (2022-05-13) |
| 157 | + |
| 158 | +* Feature: Add signal handling support for `SIGINT` and `SIGTERM`. |
| 159 | + (#150 by @clue) |
| 160 | + |
| 161 | +* Feature: Improve error output for exception messages with special characters. |
| 162 | + (#131 by @clue) |
| 163 | + |
| 164 | +* Add new documentation chapters for Docker containers and HTTP redirecting. |
| 165 | + (#138 by SimonFrings and #136, #151 and #156 by @clue) |
| 166 | + |
| 167 | +* Minor documentation improvements. |
| 168 | + (#143 by @zf2timo, #153 by @mattschlosser and #129 and #154 by @clue) |
| 169 | + |
| 170 | +* Improve test suite and add tests for `Dockerfile` instructions. |
| 171 | + (#148 and #149 by @clue) |
| 172 | + |
| 173 | +## 0.8.0 (2022-03-07) |
| 174 | + |
| 175 | +* Feature: Automatically start new fiber for each request on PHP 8.1+. |
| 176 | + (#117 by @clue) |
| 177 | + |
| 178 | +* Feature: Add fiber compatibility mode for PHP < 8.1. |
| 179 | + (#128 by @clue) |
| 180 | + |
| 181 | +* Improve documentation and update installation instructions for react/async. |
| 182 | + (#116 and #126 by @clue and #124, #125 and #127 by @SimonFrings) |
| 183 | + |
| 184 | +* Improve fiber tests to avoid now unneeded `await()` calls. |
| 185 | + (#118 by @clue) |
| 186 | + |
| 187 | +## 0.7.0 (2022-02-05) |
| 188 | + |
| 189 | +* Feature: Update to use HTTP status code constants and JSON/HTML response helpers. |
| 190 | + (#114 by @clue) |
| 191 | + |
| 192 | + ```php |
| 193 | + $app->get('/users/{name}', function (Psr\Http\Message\ServerRequestInterface $request) { |
| 194 | + return React\Http\Message\Response::plaintext( |
| 195 | + "Hello " . $request->getAttribute('name') . "!\n" |
| 196 | + ); |
| 197 | + }); |
| 198 | + ``` |
| 199 | + |
| 200 | +* Feature / Fix: Update to improve protocol handling for HTTP responses with no body. |
| 201 | + (#113 by @clue) |
| 202 | + |
| 203 | +* Minor documentation improvements. |
| 204 | + (#112 by @SimonFrings and #115 by @netcarver) |
| 205 | + |
| 206 | +## 0.6.0 (2021-12-20) |
| 207 | + |
| 208 | +* Feature: Support automatic dependency injection by using class names (DI container). |
| 209 | + (#89, #92 and #94 by @clue) |
| 210 | + |
| 211 | + ```php |
| 212 | + <?php |
| 213 | + |
| 214 | + require __DIR__ . '/../vendor/autoload.php'; |
| 215 | + |
| 216 | + $app = new FrameworkX\App(Acme\Todo\JsonMiddleware::class); |
| 217 | + |
| 218 | + $app->get('/', Acme\Todo\HelloController::class); |
| 219 | + $app->get('/users/{name}', Acme\Todo\UserController::class); |
| 220 | + |
| 221 | + $app->run(); |
| 222 | + ``` |
| 223 | + |
| 224 | +* Feature: Add support for explicit DI container configuration. |
| 225 | + (#95, #96 and #97 by @clue) |
| 226 | + |
| 227 | + ```php |
| 228 | + <?php |
| 229 | + |
| 230 | + require __DIR__ . '/../vendor/autoload.php'; |
| 231 | + |
| 232 | + $container = new FrameworkX\Container([ |
| 233 | + Acme\Todo\HelloController::class => fn() => new Acme\Todo\HelloController(); |
| 234 | + Acme\Todo\UserController::class => function (React\Http\Browser $browser) { |
| 235 | + // example UserController class requires two arguments: |
| 236 | + // - first argument will be autowired based on class reference |
| 237 | + // - second argument expects some manual value |
| 238 | + return new Acme\Todo\UserController($browser, 42); |
| 239 | + } |
| 240 | + ]); |
| 241 | + |
| 242 | + // … |
| 243 | + ``` |
| 244 | + |
| 245 | +* Feature: Refactor to use `$_SERVER` instead of `getenv()`. |
| 246 | + (#91 by @bpolaszek) |
| 247 | + |
| 248 | +* Minor documentation improvements. |
| 249 | + (#100 by @clue) |
| 250 | + |
| 251 | +* Update test suite to use stable PHP 8.1 Docker image. |
| 252 | + (#90 by @clue) |
| 253 | + |
| 254 | +## 0.5.0 (2021-11-30) |
| 255 | + |
| 256 | +* Feature / BC break: Simplify `App` by always using default loop, drop optional loop instance. |
| 257 | + (#88 by @clue) |
| 258 | + |
| 259 | + ```php |
| 260 | + // old |
| 261 | + $loop = React\EventLoop\Loop::get(); |
| 262 | + $app = new FrameworkX\App($loop); |
| 263 | + |
| 264 | + // new (already supported before) |
| 265 | + $app = new FrameworkX\App(); |
| 266 | + ``` |
| 267 | + |
| 268 | +* Add documentation for manual restart of systemd service and chapter for Caddy deployment. |
| 269 | + (#87 by @SimonFrings and #82 by @francislavoie) |
| 270 | + |
| 271 | +* Improve documentation, remove leftover `$loop` references and fix typos. |
| 272 | + (#72 by @shuvroroy, #80 by @Ivanshamir, #81 by @clue and #83 by @rattuscz) |
| 273 | + |
| 274 | +## 0.4.0 (2021-11-23) |
| 275 | + |
| 276 | +We are excited to announce the official release of Framework X to the public! 🎉🚀 |
| 277 | +This release includes exciting new features such as full compatibility with PHP 8.1, |
| 278 | +improvements to response handling, and enhanced documentation covering nginx, |
| 279 | +Apache, and async database usage. |
| 280 | + |
| 281 | +* Feature: Announce Framework X public beta. |
| 282 | + (#64 by @clue) |
| 283 | + |
| 284 | +* Feature: Full PHP 8.1 compatibility. |
| 285 | + (#58 by @clue) |
| 286 | + |
| 287 | +* Feature: Improve `AccessLogHandler` and fix response size for streaming response body. |
| 288 | + (#47, #48, #49 and #50 by @clue) |
| 289 | + |
| 290 | +* Feature / Fix: Skip sending body and `Content-Length` for responses with no body. |
| 291 | + (#51 by @clue) |
| 292 | + |
| 293 | +* Feature / Fix: Consistently reject proxy requests and handle `OPTIONS *` requests. |
| 294 | + (#46 by @clue) |
| 295 | + |
| 296 | +* Add new documentation chapters for nginx, Apache and async database. |
| 297 | + (#57, #59 and #60 by @clue) |
| 298 | + |
| 299 | +* Improve documentation, examples and describe HTTP caching and output buffering. |
| 300 | + (#52, #53, #55, #56, #61, #62 and #63 by @clue) |
| 301 | + |
| 302 | +## 0.3.0 (2021-09-23) |
| 303 | + |
| 304 | +* Feature: Add support for global middleware. |
| 305 | + (#23 by @clue) |
| 306 | + |
| 307 | +* Feature: Improve error output and refactor internal error handler. |
| 308 | + (#37, #39 and #41 by @clue) |
| 309 | + |
| 310 | +* Feature: Support changing listening address via new `X_LISTEN` environment variable. |
| 311 | + (#38 by @clue) |
| 312 | + |
| 313 | +* Feature: Update to new ReactPHP HTTP and Socket API. |
| 314 | + (#26 and #29 by @HLeithner and #34 by @clue) |
| 315 | + |
| 316 | +* Feature: Refactor to use new `AccessLogHandler`, `RouteHandler`, `RedirectHandler` and `SapiHandler`. |
| 317 | + (#42, #43, #44 and #45 by @clue) |
| 318 | + |
| 319 | +* Fix: Fix path filter regex. |
| 320 | + (#27 by @HLeithner) |
| 321 | + |
| 322 | +* Add documentation for async middleware and systemd service unit configuration. |
| 323 | + (#24 by @Degra1991 and #32, #35, #36 and #40 by @clue) |
| 324 | + |
| 325 | +* Improve test suite and run tests on Windows with PHPUnit. |
| 326 | + (#31 by @SimonFrings and #28 and #33 by @clue) |
| 327 | + |
| 328 | +## 0.2.0 (2021-06-18) |
| 329 | + |
| 330 | +* Feature: Simplify `App` usage by making `LoopInterface` argument optional. |
| 331 | + (#22 by @clue) |
| 332 | + |
| 333 | + ```php |
| 334 | + // old (still supported) |
| 335 | + $loop = React\EventLoop\Factory::create(); |
| 336 | + $app = new FrameworkX\App($loop); |
| 337 | + |
| 338 | + // new (using default loop) |
| 339 | + $app = new FrameworkX\App(); |
| 340 | + ``` |
| 341 | + |
| 342 | +* Feature: Add middleware support. |
| 343 | + (#18 by @clue) |
| 344 | + |
| 345 | +* Feature: Refactor and simplify route dispatcher. |
| 346 | + (#21 by @clue) |
| 347 | + |
| 348 | +* Feature: Add Generator-based coroutine implementation. |
| 349 | + (#17 by @clue) |
| 350 | + |
| 351 | +* Minor documentation improvements. |
| 352 | + (#15, #16 and #19 by @clue) |
| 353 | + |
| 354 | +## 0.1.0 (2021-04-30) |
| 355 | + |
| 356 | +We're excited to announce the release of the first version of Framework X in |
| 357 | +private beta! This version marks the starting point of our project and is the |
| 358 | +first of many milestones for making async PHP easier than ever before. |
| 359 | + |
| 360 | +* Release Framework X, major documentation overhaul and improve examples. |
| 361 | + (#14, #13 and #2 by @clue) |
| 362 | + |
| 363 | +* Feature: Support running behind nginx and Apache (PHP-FPM and mod_php). |
| 364 | + (#3, #11 and #12 by @clue) |
| 365 | + |
| 366 | +* Feature / Fix: Consistently parse request URI and improve URL handling. |
| 367 | + (#4, #5, #6 and #7 by @clue) |
| 368 | + |
| 369 | +* Feature: Rewrite `FilesystemHandler`, improve file access and directory listing. |
| 370 | + (#8 and #9 by @clue) |
| 371 | + |
| 372 | +* Feature: Add `any()` router method to match any request method. |
| 373 | + (#10 by @clue) |
0 commit comments