zendframework/zf2 — comment on commit c508ce94e4eb2b169de95372e221db69436e0480
File: modules/Zf2Mvc/src/Zf2Mvc/Application.php line 276
By rafalwrzeszcz:

I propose to add some prefix here, for example: `'controller-'`.

For two reasons:

- Large systems will probably use many aliases. It can cause a collision. Serives like "mailer" (both `Zend\Mail\Mail` instance and mailing sending controller), "acl" (both `Zend\Acl\Acl` instance and right management controller can be ambigous.
- If you will have default routing enabled, it will most likely map %controller% right from URL to your DI - I know we check if fetched instance is of type `Dispatchable`, but still it will call it's constructor (and in more complex DI configurations also cause some injections). If you will have anything automated through DI (for example logged with associated write streams) it can be initialized in unpredicted way by just entering URL.