Routing is now done via the Slim\Middleware\RoutingMiddleware . By default routing will be performed last in the middleware queue. If you want to access the route and routingResults attributes from $request you will need to add this middleware last as it will get executed first within the queue when running the app. The middleware queue is still being executed in Last In First Out (LIFO) order. This replaces the determineRouteBeforeAppMiddleware setting.
The Slim 4 ResponseEmitter uses the value 4096 already as default value. As long as you don’t want to change this value, you don’t have to do anything.
If you want to change this default value, you have to replace this:
$app->run();
with…
use Slim\Factory\ServerRequestCreatorFactory;
use Slim\ResponseEmitter;
// ...
$request = ServerRequestCreatorFactory::create()->createServerRequestFromGlobals();
$response = $app->handle($request);
// Pass the new value here
$responseEmitter = new ResponseEmitter(8192);
$responseEmitter->emit($response);
http_version: '1.1'
The default http version is 1.1. So there is no need to change it.
With a middleware you can change the HTTP version from 1.1 to 1.0 as follows: