docs icon indicating copy to clipboard operation
docs copied to clipboard

Update info on Twig namespaces

Open ameotoko opened this issue 3 years ago • 6 comments

This updates Twig Namespaces section with more precise information about which bundle templates directory is registered automatically, and which can optionally be added.

ameotoko avatar Aug 25 '22 09:08 ameotoko

In Symfony 6 the default is different. May be we should link to the Symfony Docs instead?

fritzmg avatar Aug 29 '22 08:08 fritzmg

What do you mean? The section on namespaces is identical between 5.4 and 6.1 branches.

ameotoko avatar Aug 29 '22 09:08 ameotoko

I mean https://symfony.com/doc/current/bundles/best_practices.html#directory-structure

In Symfony 6 you can extend from AbstractBundle which returns the root directory of the package in getPath by default.

fritzmg avatar Aug 29 '22 09:08 fritzmg

Will the example on creating a bundle be updated as well?

ameotoko avatar Aug 29 '22 09:08 ameotoko

Yes, I definitely want to update that as well (though not by using AbstractBundle).

fritzmg avatar Aug 29 '22 10:08 fritzmg

How about now, @fritzmg?

ameotoko avatar Sep 27 '22 13:09 ameotoko

Unfortunately there is a conflict with this PR now. The section has moved to https://github.com/contao/docs/blob/main/docs/dev/framework/templates/architecture.md

fritzmg avatar May 01 '23 14:05 fritzmg

I rebased and brought my edits to the new location "as is". However, I was not following the core team's work in past months, so I may not be on top of the things with this PR anymore.

ameotoko avatar May 02 '23 00:05 ameotoko

Thank you @ameotoko

fritzmg avatar May 02 '23 07:05 fritzmg