Skip to content

Add exist method to TemplateRendererInterface #58

@alexander-schranz

Description

@alexander-schranz

There are currently 2 options we can use. There can be a TemplateNotFoundException or a exist method on the TemplateRendererInterface. As feedback from @fabpot here: php-fig/fig-standards#1280 (comment):

Having to catch an exception for non-existing templates was a performance issue in Twig as we have a feature that let you fall back to other templates. So we added a way to check if a template exists that returns a Boolean.

So the exception isn't ideal and a exist method is better. We need to check which

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureA new feature to be added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions