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

[Serializer] Fix BackedEnumNormalizer behavior with partial denormalization#62321

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

Open
yoeunes wants to merge1 commit intosymfony:6.4
base:6.4
Choose a base branch
Loading
fromyoeunes:serializer-enum-partial-denormalization

Conversation

@yoeunes
Copy link
Contributor

QA
Branch?6.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
IssuesFixes#62313
LicenseMIT

This PR fixes a bug inBackedEnumNormalizer that occurs when usingcollect_denormalization_errors andallow_invalid_values at the same time.

Whenallow_invalid_values was set, the normalizer would returnnull for invalid data (likenull)beforeNotNormalizableValueException could be thrown.

This caused the denormalization to fail with a fatalTypeError (e.g.,Typed property ... must not be null) instead of populating aPartialDenormalizationException with the expected type errors.

This fix ensures thatNotNormalizableValueException is still thrown whencollect_denormalization_errors is active (not_normalizable_value_exceptions context key is set), allowing the Serializer to catch it and report the error correctly.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

2 participants

@yoeunes@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp