Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4ef0ab0

Browse filesBrowse files
committed
minor #14152 Remove paragraph about doctrine mapping override (l-vo)
This PR was merged into the 3.4 branch. Discussion ---------- Remove paragraph about doctrine mapping override Hello, I would suggest to remove the paragraph about mapping override because it doesn't work in all cases. I read the related PR (#10053) and the issue (#7076) which motivated it. The example in the issue works only because `auto_mapping` is set to `true` (`auto_mapping: true` allows to find definitions in `Resources/config/doctrine/*.orm.{xml, yml, php} of all the bundles even if nothing is declared in the bundles). From the POV of the bundle , it's IMHO not a good practice to rely on app `auto_mapping` configuration (the trend for sf4 and sf5 is to rely on configurations over conventions). So when bundle mapping rely on the dedicated compiler pass (example [here](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/cf7fe27b2f4e1f298ee6eadf537267f8c9f9b85c/FOSUserBundle.php#L50)) and not on `auto_mapping` app configuration , the mapping definition file in the compiler pass (from the bundle) overrides the mapping definition file defined in the application. Commits ------- 49eca77 Remove paragraph about mapping override
2 parents a3f6457 + 49eca77 commit 4ef0ab0
Copy full SHA for 4ef0ab0

File tree

1 file changed

+2
-7
lines changed
Filter options

1 file changed

+2
-7
lines changed

‎bundles/override.rst

Copy file name to clipboardExpand all lines: bundles/override.rst
+2-7Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,8 @@ inside a :doc:`compiler pass </service_container/compiler_passes>`.
5353
Entities & Entity Mapping
5454
-------------------------
5555

56-
If a bundle defines its entity mapping in configuration files instead of
57-
annotations, you can override them as any other regular bundle configuration
58-
file. The only caveat is that you must override all those mapping configuration
59-
files and not just the ones you actually want to override.
60-
61-
If a bundle provides a mapped superclass (such as the ``User`` entity in the
62-
FOSUserBundle) you can override its attributes and associations. Learn more
56+
Entity mapping can only be overridden if a bundle provides a mapped superclass (such as the ``User`` entity in the
57+
FOSUserBundle). It's possible to override attributes and associations in this way. Learn more
6358
about this feature and its limitations in `the Doctrine documentation`_.
6459

6560
Forms

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.