Skip to content

[Templating] TemplateReference::getPath hardcodes "views" directory #25019

Closed
@geecu

Description

@geecu
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? yes/no
Symfony version 3.4.0-BETA2

While trying to add Symfony 4 support to LiipThemeBundle I came across this: the bundle calls Symfony\Bundle\FrameworkBundle\Templating\Template\TemplateNameParser::parse() with a simple name (not containing a bundle): index.html. This creates a TemplateReference with no bundle, but TemplateReference::getPath() returns views/index.html.twig for the path. As with the twig engine the templates is searched in templates/ directory, this looks like a bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions