-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Fix configuration inheritance to not override default connection/EM values #1648
Fix configuration inheritance to not override default connection/EM values #1648
Conversation
34af8c5
to
d6dc672
Compare
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.
This was a can of worms last time, so I think I will need review from someone else as well.
a07c83d
to
18874e1
Compare
Yeah, I've read that 😞 |
…nection and default_entity_manager This another take at fixing 1337 but also at dbal section that has the same issue with `default_connection`
18874e1
to
17bc9a3
Compare
@ostrolucky thank you for the review btw! |
could we do the checks on default connection and default entity manager together at the beginning, to process the configuration only twice instead of 3 times ? Otherwise, we might report deprecations 3 times when a deprecated setting is used. |
Good call @stof ! |
Good idea I think |
85f44de
to
f071a0a
Compare
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.
LGTM and also tested it quickly on one of my apps: no issues 👍
Hi there!
I recently unveiled a weird behavior when doing some cleanup on a project I work on.
Long story short, we have several connections, use a different name than
default
for the main one, and because we have config files defining onlydoctrine.dbal.types
, thedefault_connection
ends up being reset todefault
.While trying to fix this I realized this is similar to #1337 (just another section of the config really), so I try to fix #1337 at the same time (therefore being an alternative to #1356).
The true nature of the fix is mostly not to run the custom pre-normalization process but then this makes the default empty configuration not work anymore.
So we move the side effect of this process (creating an empty 'default' connection configuration) out in the Extension and we rerun the normalization process again so that the default values for connections and entity manager get resolved properly.
This should be considered a bugfix, but I'm not really sure which branch to target in that case, let me know if you want me to rebase and target another branch instead