yiisoft / app

Yii3 application template

Home Page:https://www.yiiframework.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move SessionMiddleware, CsrfMiddleware, ErrorCatcher Middleware to routes

mj4444ru opened this issue · comments

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.

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.