-
-
Notifications
You must be signed in to change notification settings - Fork 495
[symfony/twig-bundle] remove "paths", thats already the default #416
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
We could copy the existing recipe to make this on only available for 3.4 and up even if 3.3 is not maintained anymore (but we then just wouldn't do any updates anymore for the 3.3 recipe). |
I kinda like this config: it’s nice to say “why do templates live here? Check out this config!”. And then you easily know how to add more paths. I’m kind of a fan of including more config than we need in these files (but probably commented out with default values, most of the time). So, I think the DX is better WITH the config. Wdyt? |
Errors are odd right now: the path is mentioned two times... |
Well, we could also think about improving the error message instead (i.e. checking if the default path is also part of the other configured paths?). |
Maybe enhance the registration logic? The error message is accurate about what happens under the hood so this should remain :) |
Maybe Twig shouldn't add the same namespace/path twice. |
If we want to keep this config, what about to show the |
Related to symfony/symfony#27728 I suppose? |
I think this is a diffent issue, actually we're adding the root It's necessary only for 3.3, since 3.4 this path is already added through twig:
default_path: '%kernel.project_dir%/templates' even if it's the default value. |
(3.3 is EOLed so we don't really care for it) |
and we need to do the same for
It has |
I agree that having this setting even if that's the default value is nice. Let's close. |
@fabpot but behind this there is a problem:
Edit: See alternative #434 to solve it. |
@yceruto I know, but that's something we need to fix on the Symfony side. |
@fabpot that means we should avoid to add the same path twice in the Twig loader? |
@yceruto Probably, yes |
since 3.4 at least, but 3.3 is EOLed.