I wrote an article on Medium about how I manage dependencies required by controllers/actions. The main points are:
- I don’t need to register all my actions/controllers to the container.
- I don’t need to remember my dependencies order when injecting through constructor
- The dependencies are served from the app container under the hood by extending (read: improve) the default CallableResolver class.
- It’s actually utilizing \ReflectionClass and seems very easy to understand
I really want to hear the feedback from you. Thanks in advance!