# Controllers/Actions in Slim 3 + Auto-resolved dependencies

**URL:** <https://discourse.slimframework.com/t/controllers-actions-in-slim-3-auto-resolved-dependencies/507>\
**Category:** Site Feedback\
**Created:** [July 14, 2016, 4:21pm UTC](https://discourse.slimframework.com/t/controllers-actions-in-slim-3-auto-resolved-dependencies/507 "2016-07-14T16:21:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dewey92](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/dewey92/32/58_2.png) [@dewey92](https://discourse.slimframework.com/u/dewey92)\
**Post date:** [July 14, 2016, 4:21pm UTC](https://discourse.slimframework.com/t/controllers-actions-in-slim-3-auto-resolved-dependencies/507/1 "2016-07-14T16:21:58Z")

</div>

I wrote an article on [Medium](https://medium.com/@Dewey92/controller-in-slim-framework-3-48a3310452d0) about how I manage dependencies required by controllers/actions. The main points are:

1. I don’t need to register all my actions/controllers to the container.
2. I don’t need to remember my dependencies order when injecting through constructor
3. The dependencies are served from the app container under the hood by _extending_ (read: improve) the default CallableResolver class.
4. It’s actually utilizing \ReflectionClass and seems very easy to understand

I really want to hear the feedback from you. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![geggleto](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/geggleto/32/11_2.png) [@geggleto](https://discourse.slimframework.com/u/geggleto)\
**Post date:** [July 14, 2016, 4:42pm UTC](https://discourse.slimframework.com/t/controllers-actions-in-slim-3-auto-resolved-dependencies/507/2 "2016-07-14T16:42:21Z")

</div>

If I remember correctly you can do all of this with the PHP-DI-BRIDGE and not have to do any of that.

> **[PHP-DI/Slim-Bridge](https://github.com/PHP-DI/Slim-Bridge)**
>
> PHP-DI integration with the Slim framework. Contribute to PHP-DI/Slim-Bridge development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![dewey92](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/dewey92/32/58_2.png) [@dewey92](https://discourse.slimframework.com/u/dewey92)\
**Post date:** [July 14, 2016, 5:23pm UTC](https://discourse.slimframework.com/t/controllers-actions-in-slim-3-auto-resolved-dependencies/507/3 "2016-07-14T17:23:24Z")

</div>

Thanks @geggleto for providing me the link to that. But, does that project require us to use at least PHP 5.6? Unfortunately, I’m running on a 5.5 shared hosting 😐 so yeah…

---

<div class="post-metadata">

**Author:** ![geggleto](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/geggleto/32/11_2.png) [@geggleto](https://discourse.slimframework.com/u/geggleto)\
**Post date:** [July 14, 2016, 5:59pm UTC](https://discourse.slimframework.com/t/controllers-actions-in-slim-3-auto-resolved-dependencies/507/4 "2016-07-14T17:59:14Z")

</div>

you might want to remind your employeers that 5.5 is now EOL and will no longer receive security updates.
