Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[FrameworkBundle] Deprecate setting thecollect_serializer_data
tofalse
#60069
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
Conversation
What's the rational? Didn't we add the option because the overhead was significant? Did anything change? |
f842425
to5cf77b8
Comparemtarld commentedMar 28, 2025 • edited by nicolas-grekas
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by nicolas-grekas
Uh oh!
There was an error while loading.Please reload this page.
Back in time, we added that flag to prevent apps that were injecting concrete implementations instead of interfaces to break when upgrading to 6.1. IIRC, there was no relation with any overhead at that time. For the record, users doing: publicfunction__construct(ObjectNormalizer$normalizer) {} instead of: publicfunction__construct(#[Autowire('...')]NormalizerInterface$normalizer) {} had broken app when enabling the debug. That was why we have hidden the decoration behind a flag. |
mtarld commentedMar 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
But maybe at least we can change the default? So that we can remove the recipe definition at some point? Which means:
WDYT? |
mtarld commentedMar 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Here is the PR introducing the flag:#46625 |
Indeed, adding this option was a quick fix. It isn't meant to stay |
There are still few tests to fix for information |
Why not deprecate the option instead? |
Because the actual default value is
Deprecating the config option directly (and therefore removing it in 8.0) will not allow users to adapt their code first. But it may be ok for such a change. WDYT? |
Deprecating the option sounds good to me. The notice is what will actually urge people to fix their code so that it works with the serializer collector, no matter if it's about changing the default or removing that option. I think the latter gives enough time, no need for more. |
fcf4b27
to2f40ad4
CompareThe related tests are fixed now. |
2f40ad4
tofda5371
Compare@chalasr if you mean deprecating the option whatever the value, then I don't agree: this would annoy people that just updated their recipe / created a new project since 6.1, while at the same time create a migration risk, with a leaky BC layer. |
Fair enough |
In the upgrade note, it might be nice to tell about what you wrote in#60069 (comment) BTW. |
fda5371
to29c7562
Compare29c7562
to408d09a
CompareThank you@mtarld. |
58a14ab
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Then, in 8.1, we'll be able to deprecate this option to finally remove it in 9.0