@request
, @user
, @auth
, @controller.helper
, @dbal.conn
and @template
services (sometimes all of them), because almost every controller just reads input from @request
, performs some checks via @user
and @auth
, retrieves data via @dbal.conn
, sets variables to @template
and returns the response via @controller.helper->render()
method. This behavior generates a lot of boilerplate code (and I hate boilerplate code )We could create an abstract default controller which will have these services and maybe some helper methods inside 'automagically', and then this controller will be extended by our class (of course if we want it). It won't break any BC, because it's just an option.
We probably also can think about extending the list of services which can be injected directly into the action method via type-hinting. Currently it works only for Symfony Request object.