-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Config] Remap XML before normalization #21052
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
Conversation
Added failing test that proves we get a de-normalized form in normalization closures. This PR fixes XML remapping, but setting the key attrribute actually still happens in From a normalization closure;
And without this PR you'd even get Same for replacing equivalent values... |
If we agree with behavior change in master i propose to go with;
Basically this is about separating child normalization (post) from technical normalization (pre), where user normalization lives in between. From a user normalization closure you can add a (de)normalized child, but you should not rely on existing children to be fully normalized as they are out of scope for the current node. |
Just a confirmation: is this PR for master or for a lower branch? |
Depends on SF's policy on behavioral changes :) I think we should do the master+changelog approach on this. I already imagine people relying on certain keys.. or not expecting certain ones for that matter (to make things work perhaps). |
How would you write code then that has to support different Symfony versions? |
Maybe adding Imo. XML remapping and key normalization are kinda at the same level.. but maybe im wrong? I can understand before normalization actually runs before |
this PR is a BC break, and then the name Btw, if you need to know whether whether the feature is enabled or no, it probably means you need to run your logic after the merging of different files too (as it can be enabled in a different file). So use |
i believe my issue was one where i got a different value depending on the format (YAML gives plural, XML singular) which i didnt really expected 👍 for |
Closing for now :) not sure anymmore what to do here. I believe moving things to |
You never seem to get the remapped value with things like
beforeNormalization()
etc.Meaning you never get the normalized form which makes deprecating for instance really hard ;-)