Move SessionMiddleware, CsrfMiddleware, ErrorCatcher Middleware to routes
mj4444ru opened this issue · comments
Eugene (mj4444) commented
It is proposed by SessionMiddleware, CsrfMiddleware, ErrorCatcher to transfer MiddlewareProvider.php to routes.php since the application can have REST API and other APIs for which these Middleware are not required.
Alexander Makarov commented
These are different ways of registering middleware. Error handler should be application wide in majority of cases while the rest are used like that in the app template. I'll update docs to describe it better.