-
-
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c521227
Add third column to specific emplacements table describing relationship
rcousens fe86c35
Fix as per comments
rcousens e7d72ed
Fix spacing on third column
rcousens a53277e
Tweaked the table contents
javiereguiluz 4145ed5
Fixed some wrong explanations
javiereguiluz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,22 +115,23 @@ them under the ``cache/`` or ``log/`` directory of the host application. Tools | |
can generate files in the bundle directory structure, but only if the generated | ||
files are going to be part of the repository. | ||
|
||
The following classes and files have specific emplacements: | ||
|
||
=============================== ============================= | ||
Type Directory | ||
=============================== ============================= | ||
Commands ``Command/`` | ||
Controllers ``Controller/`` | ||
Service Container Extensions ``DependencyInjection/`` | ||
Event Listeners ``EventListener/`` | ||
Model classes [1] ``Model/`` | ||
Configuration ``Resources/config/`` | ||
Web Resources (CSS, JS, images) ``Resources/public/`` | ||
Translation files ``Resources/translations/`` | ||
Templates ``Resources/views/`` | ||
Unit and Functional Tests ``Tests/`` | ||
=============================== ============================= | ||
The following classes and files have specific emplacements (some are mandatory | ||
and others are just conventions followed by most developers): | ||
|
||
=============================== ============================= ================ | ||
Type Directory Mandatory? | ||
=============================== ============================= ================ | ||
Commands ``Command/`` Yes | ||
Controllers ``Controller/`` No | ||
Service Container Extensions ``DependencyInjection/`` Yes | ||
Event Listeners ``EventListener/`` No | ||
Model classes [1] ``Model/`` No | ||
Configuration ``Resources/config/`` No | ||
Web Resources (CSS, JS, images) ``Resources/public/`` Yes | ||
Translation files ``Resources/translations/`` Yes | ||
Templates ``Resources/views/`` Yes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Unit and Functional Tests ``Tests/`` No | ||
=============================== ============================= ================ | ||
|
||
[1] See :doc:`/cookbook/doctrine/mapping_model_classes` for how to handle the | ||
mapping with a compiler pass. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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/*
?