-
-
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
Better explain the mandatory/convention location of some elements #6616
Conversation
The standard Symfony2 framework has mandatory requirements about specific emplacements, and then others that are considered best practice by convention. This commit makes the documentation clearer in order to provide a developer with reasonable expectations about the consequences of altering the default directory structure. Additionally, newer developers may be less intimidated and concerned by whether they are compromising any auto-wiring functionality by deviating from the information provided.
Renamed Relationship column to Location and updated value for Tests to Mandatory due to default phpunit config.
Type Directory Mandatory? | ||
=============================== ============================= ================ | ||
Commands ``Command/`` Yes | ||
Controllers ``Controller/`` Yes |
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.
Why is this one mandatory?
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.
I've just checked. This is not mandatory.
I've made the requested changes. Hopefully this is now ready to be merged. Thanks! |
👍 Technically, you could also work around the other "mandatory" locations, but I think we should only document the "standard" way. Status: Reviewed |
The longer this one is open, the less I like it. So let's quickly merge :) Thanks @rcousens! |
…elements (rcousens, javiereguiluz) This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #6616). Discussion ---------- Better explain the mandatory/convention location of some elements This finishes #5559 by implementing the comments made by @wouterj Commits ------- eee4750 Fixed some wrong explanations 4a2c92f Tweaked the table contents cd0b889 Fix spacing on third column b853e52 Fix as per comments 99da972 Add third column to specific emplacements table describing relationship
=============================== ============================= ================ | ||
Type Directory Mandatory? | ||
=============================== ============================= ================ | ||
Commands ``Command/`` Yes |
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.
technically, not fully (mandatory only for auto-registration, but we have tag-based registration since 2.4)
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.
Yeah, that applies to about 99% of the mandatory elements in this table. That's why I started to dislike documenting these. But I think it'll help if we document the default way for beginners.
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.
I agree (see my comment above).
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.
What if we revert this change and add a short cookbook article explaining how to override all of these locations?
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.
Are we sure it's worth it? How often do you need to do that? And if you have the need, won't you probably experienced enough to figure that out yourself?
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.
I don't think it's that easy. For example: how do you put the translations in <your-bundle>/translations/*
instead of <your-bundle>/Resources/translations/
or the templates in <your-bundle>/templates/*
instead of <your-bundle>/Resources/views/*
?
This finishes #5559 by implementing the comments made by @wouterj