Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use namespaced template paths for Symfony #20

Conversation

jdworschak
Copy link
Contributor

This changes the template reference resolution for Symfony controller actions to use the newer namespaced template paths vs. the older colon-separated syntax.

Old version: FooBundle:Folder:Subfolder:template.html.twig
Namespaced Version: @Foo/Folder/Subfolder/template.html.twig

Starting with Symfony 5 the old syntax does not seem to work in all cases anymore. In Symfony 4 there seem to be resolution issues with this when not using the now deprecated framework templating integration (framework.templating config) to enable Twig. Unfortunately, I couldn't quite pinpoint what change exactly drops the support for the old syntax but the newer syntax has been suggested in the official Symfony docs for a couple of major versions now, so I feel like this change is generally beneficial.

These namespaced paths are available since before Symfony 4 so there should not be any compatibility issues with the currently supported versions.

@beberlei beberlei merged commit 3bfd5d8 into gyro-project:master Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants