Version: 3.1.*
Since 3.1, it is impossible to use a custom implementation of Nette\Application\UI\ITemplateFactory (Nette\Application\UI\TemplateFactory since 3.1) with Nette\Bridges\ApplicationDI\LatteExtension.
Steps To Reproduce
- implement
ITemplateFactory
- register it as your template factory service (
latte.templateFactory)
- try to compile the container
What's going on
LatteExtension registers an on-compile call to LatteExtension::initLattePanel that has a type hint for the concrete implementation Nette\Bridges\ApplicationLatte\TemplateFactory and not the interface, causing TypeError.