-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Best practices template names #5001
Conversation
Conflicts: book/http_cache.rst book/validation.rst
My vote goes for the changes that you made on this PR:
My reasons:
|
-1. It much easier to correspond controller class -> directory, action method -> template with old naming. |
@Koc you are right of course. But keep in mind that it's not uncommon for controllers to render templates that don't match 1:1 their class+method name. For example:
In my opinion, the |
👍 for me (though barely). And this kills But I like it because it highlights more clearly that you can name the directory/template whatever you want. I think sometimes that detail is lost to beginners - they're just always saying What do @symfony/deciders think? |
@weaverryan the best practice of putting templates in app rather than in the bundle folder is already killing |
@stof Good point. I personally don't really care for |
@weaverryan please note that there is a best practice recommending against using
|
Thanks for this Wouter! Since we heard more agreement than disagreement, we'll recommend this as the standard (of course, people can do whatever they like). Cheers! |
This PR was merged into the 2.3 branch. Discussion ---------- Best practices template names @javiereguiluz @weaverryan wanted your opinion on this. Commits ------- 2b65304 Use snake_case for template names
@javiereguiluz @weaverryan wanted your opinion on this.