Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use custom TemplateFactory with LatteExtension since 3.1 #287

Closed
dakujem opened this issue May 19, 2021 · 0 comments · Fixed by #288
Closed

Unable to use custom TemplateFactory with LatteExtension since 3.1 #287

dakujem opened this issue May 19, 2021 · 0 comments · Fixed by #288

Comments

@dakujem
Copy link

dakujem commented May 19, 2021

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

  1. implement ITemplateFactory
  2. register it as your template factory service (latte.templateFactory)
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant