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

[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

Merged

Conversation

mtarld
Copy link
Contributor

@mtarldmtarld commentedMar 28, 2025
edited
Loading

QA
Branch?7.3
Bug fix?no
New feature?no
Deprecations?yes
Issues
LicenseMIT

Then, in 8.1, we'll be able to deprecate this option to finally remove it in 9.0

matyo91 reacted with rocket emoji
@nicolas-grekas
Copy link
Member

What's the rational? Didn't we add the option because the overhead was significant? Did anything change?

chalasr reacted with thumbs up emoji

@mtarldmtarldforce-pushed thefeat/collect-serializer-data branch fromf842425 to5cf77b8CompareMarch 28, 2025 08:56
@mtarldmtarld requested a review fromchalasr as acode ownerMarch 28, 2025 08:56
@mtarld
Copy link
ContributorAuthor

mtarld commentedMar 28, 2025
edited by nicolas-grekas
Loading

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
Copy link
ContributorAuthor

mtarld commentedMar 28, 2025
edited
Loading

But maybe at least we can change the default? So that we can remove the recipe definition at some point?

Which means:

  • requiring to define explicitly the value in 7.3
  • change the default in 8.0

WDYT?

@mtarld
Copy link
ContributorAuthor

mtarld commentedMar 28, 2025
edited
Loading

Here is the PR introducing the flag:#46625

@chalasr
Copy link
Member

Indeed, adding this option was a quick fix. It isn't meant to stay

@mtarld
Copy link
ContributorAuthor

There are still few tests to fix for information

@fabpot
Copy link
Member

Why not deprecate the option instead?

@mtarld
Copy link
ContributorAuthor

Because the actual default value isfalse, and I want to have atrue in the end, I think the steps should be:

  • deprecate not setting the value totrue (7.3)
  • deprecate the config option (8.1) - as it'll betrue for sure
  • remove the config option (9.0)

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?

@chalasr
Copy link
Member

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.

mtarld reacted with thumbs up emoji

@mtarldmtarldforce-pushed thefeat/collect-serializer-data branch 2 times, most recently fromfcf4b27 to2f40ad4CompareMarch 29, 2025 10:15
@mtarld
Copy link
ContributorAuthor

The related tests are fixed now.

@mtarldmtarldforce-pushed thefeat/collect-serializer-data branch from2f40ad4 tofda5371CompareMarch 31, 2025 09:03
@nicolas-grekas
Copy link
Member

@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.

@chalasr
Copy link
Member

Fair enough

@nicolas-grekas
Copy link
Member

In the upgrade note, it might be nice to tell about what you wrote in#60069 (comment) BTW.

@mtarldmtarldforce-pushed thefeat/collect-serializer-data branch fromfda5371 to29c7562CompareMarch 31, 2025 15:28
@mtarld
Copy link
ContributorAuthor

@mtarldmtarldforce-pushed thefeat/collect-serializer-data branch from29c7562 to408d09aCompareMarch 31, 2025 15:34
@nicolas-grekas
Copy link
Member

Thank you@mtarld.

@nicolas-grekasnicolas-grekas merged commit58a14ab intosymfony:7.3Mar 31, 2025
10 checks passed
@mtarldmtarld deleted the feat/collect-serializer-data branchMarch 31, 2025 15:47
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

5 participants
@mtarld@nicolas-grekas@chalasr@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp