Skip to content

Contradicting Info On Bundle Repository Structure #21094

Open
@finn-matti

Description

@finn-matti

It seems that the directory structure for bundles is not very clearly defined and has contradicting info in the Documentation.

I noticed this, because I tried to find out where bundle templates are supposed to go. The first link says:

templates/
Holds templates organized by controller name (e.g. category/show.html.twig).

The second link says (in the table a little further down):

Templates | templates/

But the third link says:

If you install packages/bundles in your application, they may include their own Twig templates (in the Resources/views/ directory of each bundle). To avoid messing with your own templates, Symfony adds bundle templates under an automatic namespace created after the bundle name.

And the later one seems to be correct. I know that the structure is a convention, but I think that this is very confusing at the moment. E.g.: Will a twig namespace not be created for a templates folder?

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