-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added Doctrine entities and documents to the list of known locations for classes #7156
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,23 +116,20 @@ files are going to be part of the repository. | |
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 | ||
Unit and Functional Tests ``Tests/`` No | ||
=============================== ============================= ================ | ||
|
||
[1] See :doc:`/doctrine/mapping_model_classes` for how to handle the | ||
mapping with a compiler pass. | ||
=============================== ======================================== ========== | ||
Type Directory Mandatory? | ||
=============================== ======================================== ========== | ||
Commands ``Command/`` Yes | ||
Controllers ``Controller/`` No | ||
Service Container Extensions ``DependencyInjection/`` Yes | ||
Doctrine entities and documents ``Entity/`` (ORM) or ``Document/`` (ODM) No | ||
Event Listeners ``EventListener/`` No | ||
Configuration ``Resources/config/`` No | ||
Web Resources (CSS, JS, images) ``Resources/public/`` Yes | ||
Translation files ``Resources/translations/`` 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. To complete the PR, WDYT about adding 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. I'm not sure because those directories are optional when using annotations. In this case, I'd also like to have a dedicated article to explain these things, as stated in a previous comment. |
||
Templates ``Resources/views/`` Yes | ||
Unit and Functional Tests ``Tests/`` No | ||
=============================== ======================================== ========== | ||
|
||
Classes | ||
------- | ||
|
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 did you tag this as not 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.
Because thanks to the
doctrine.orm.mapings
you can store your entities anywhere you like, even outside the bundles.In any case, I dislike this
Mandatory
column more and more. The intention is good, but this cannot simply be answered by Yes or No. I propose to remove this column and add a new article explaining how to override the location every single part of the bundle: controllers, templates, entities, commands, etc.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.
The same argument applies to nearly all other rows where have set this column to "yes". So I would rather say let's remove the column.
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.
By the way, we have such an article: http://symfony.com/doc/current/bundles/override.html
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.
👍 for removing this column.
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.
see also #8269 which made some changes in the
3.4
branch because auto-discovering commands based on their location will be deprecated