Nette extension: do not autowire template helper#64
Nette extension: do not autowire template helper#64florianeckerstorfer merged 1 commit intococur:masterfrom lookyman:nette-autowired
Conversation
|
I have no experience with Nette what-so-ever, would you mind to explain this change to me and does it break existing usage of the service? |
|
Technically yes, it is a BC break. Previously, the template helper was registered as an autowireable service in DI container, which meant you could autowire it by it's class name (like, in typehint) into your services if you wanted to. Now, if you want to achieve the same result, you have to pass it manually in config by it's service name ( However, the only sane place in which you want to have a template helper is Latte engine (which creates templates for you), and the extension does that already. If you want to have a Slugify service anywhere else, you should autowire The |
|
Thanks for taking the time explaining this. I will just trust you on this. |
Do not autowire template helper in Nette integration
..also previous setInject was pointless.