Skip to content

[DX][Templating] Include file locations in "Template could not be found" exception #14806

@wouterj

Description

@wouterj

When a template could not be found, the message currently only shows the locator that couldn't be located:

Unable to find template "default/index.html.twig".

It would be much nicier if it shows you where it did search for this locator, so people know where to put their files. E.g:

Unable to find template "default/index.html.twig" (tried: "app/Resources/default/index.html.twig")

Unable to find template "AcmeDemoBundle::index.html.twig" (tried: "app/Resources/AcmeDemoBundle/views/index.html.twig", "src/OverridenDemoBundle/Resources/views/index.html.twig", "vendor/acme/demo-bundle/Resources/views/index.html.twig")

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)Templating

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions