Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Remove paragraph about doctrine mapping override#14152

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:3.4froml-vo:patch-13
Sep 7, 2020

Conversation

l-vo
Copy link
Contributor

@l-vol-vo commentedAug 31, 2020
edited
Loading

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 becauseauto_mapping is set totrue (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 appauto_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 (examplehere) and not onauto_mapping app configuration , the mapping definition file in the compiler pass (from the bundle) overrides the mapping definition file defined in the application.

@javiereguiluz
Copy link
Member

I don't know if we should remove this paragraph or not (some Doctrine experts will need to help us here). But if we remove it ... then we need to add some content saying that it's not possible to override that config. The current docs say "you can do XXX" ... so if it's not possible, we should say "you CANNOT do XXX" instead of deleting the original phrase.

Because this solution only works if the bundle relies on auto_mapping. IMHO a bundle should add mapping via the dedicated compiler pass and not rely on the application configuration (`auto_mapping: true` in this case).
@l-vo
Copy link
ContributorAuthor

l-vo commentedSep 3, 2020

@javiereguiluz thank you for you feedback. I tweaked the update to underline the can/cannot idea (actually, the second paragraph explains it's possible via mapped superclasses, so I replaced "cannot" by "can only"). Now let's wait for Doctrine experts feedback :)

@javiereguiluz
Copy link
Member

Thanks Laurent! Merged.

@l-vo
Copy link
ContributorAuthor

l-vo commentedSep 7, 2020

@javiereguiluz great :) Have you had any confirmation from a Doctrine expert ?

@l-vol-vo deleted the patch-13 branchSeptember 7, 2020 18:43
@javiereguiluz
Copy link
Member

I haven't, but we need to be more proactive when merging things because we have tons of pending things to do.

@l-vo
Copy link
ContributorAuthor

l-vo commentedSep 7, 2020

Ok I understand, thank you. I tested what I wrote anyway.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
3.4
Development

Successfully merging this pull request may close these issues.

3 participants
@l-vo@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp