Skip to content

Unable to use custom TemplateFactory with LatteExtension since 3.1 #287

@dakujem

Description

@dakujem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions