New major release of middleware dispatcher package was tagged. While 1.0.0 was released only a few days ago, we had a great usability idea that, as usual, came right after 1.0.0 was done.
This release reverses middleware order. Previously it was expecting reverse order:
$dispatcher = $dispatcher->withMiddlewares([
static function (): ResponseInterface {
return new Response(418);
},
TeapotAccessChecker::class,
]);
Now it uses natural order that reads way better:
$dispatcher = $dispatcher->withMiddlewares([
TeapotAccessChecker::class,
static function (): ResponseInterface {
return new Response(418);
},
]);