8000 [TwigBundle] Template override path isn't Symfony Flex-friendly · Issue #24310 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[TwigBundle] Template override path isn't Symfony Flex-friendly #24310

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

Closed
aik099 opened this issue Sep 24, 2017 · 2 comments
Closed

[TwigBundle] Template override path isn't Symfony Flex-friendly #24310

aik099 opened this issue Sep 24, 2017 · 2 comments

Comments

@aik099
Copy link
aik099 commented Sep 24, 2017
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? yes
Symfony version 3.3.9

Before Symfony Flex:

  • template path: /app/Resources/views/{PATH/TO/TEMPLATE.html.twig}
  • override template path: app/Resources/{BUNDLE_NAME}/views/{PATH/TO/TEMPLATE.html.twig}

After Symfony Flex:

  • template path: /templates/{PATH/TO/TEMPLATE.html.twig}
  • override template path: /Resources/{BUNDLE_NAME}/views/{PATH/TO/TEMPLATE.html.twig}

As you can see the override template path doesn't match overall path change logic made in Symfony Flex.

Proposing to look for override templates in /templates/override/{BUNDLE_NAME}/views/{PATH/TO/TEMPLATE.html.twig}.

Right now the override folder is hardcoded in https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php#L128-L130

P.S.
Might be a bug, but .../_error/404.html url is looking for override templates in /src/Resources/{BUNDLE_NAME}/views/{PATH/TO/TEMPLATE.html.twig} folder.

@jvasseur
Copy link
Contributor
jvasseur commented Sep 24, 2017

This is already fixed by #24179

And the fact that the bundle is searched in /src/Resources/... is normal, the kernel root dir is src/ with flex (it shouldn't matter since we try to never use it).

@aik099
Copy link
Author
aik099 commented Sep 24, 2017

I was just 11 days late about reporting it 😉 . Thanks for pointing me out in right directly. Will try using 3.4 branch (because release is only in november) to see how it working right now.

@aik099 aik099 closed this as completed Sep 24, 2017
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

No branches or pull requests

2 participants
0