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 deserializing of nested snake_case attributes using CamelCaseToSnakeCaseNameConverter#51399

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

@Victor-Truhanovich
Copy link
Contributor

@Victor-TruhanovichVictor-Truhanovich commentedAug 16, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes
New feature?no
Deprecations?no
LicenseMIT

It was not possible to deserialize nested attributes using CamelCaseToSnakeCaseNameConverter

Example

readonlyclass Foo {publicfunction__conctruct(        #[SerializedPath("[one][two_three]")]public$fooBar,    ) {    }}$factory =newClassMetadataFactory(newAnnotationLoader(newAnnotationReader()));$normalizer =newObjectNormalizer($factory,newCamelCaseToSnakeCaseNameConverter());$serializer =newSerializer([$normalizer]);$data = ['one' => ['two_three' =>'fooBar',    ],];$foo =$serializer->denormalize($data, Foo::class,'any');

Dr10s reacted with thumbs up emoji
@Victor-Truhanovich
Copy link
ContributorAuthor

The PR was recreated because Milestone was not appointed in PR#51394

Copy link
Contributor

@mtarldmtarld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you@Victor-Truhanovich 🙂

@mtarld
Copy link
Contributor

Just one last thing, you should take care about fabbot errors:https://fabbot.io/report/symfony/symfony/51399/418bdea59c858a48dca18e493353454e16628aa1

@mtarld
Copy link
Contributor

Oh, sorry my bad, I didn't check why fabbot was yelling... Actually it's a false positive, the comments are legit here!

@Victor-Truhanovich
Copy link
ContributorAuthor

@mtarld I rollbacked code style changes

mtarld reacted with thumbs up emoji

@nicolas-grekasnicolas-grekasforce-pushed thefixed_snake_case_nested_attributes_denormalize branch fromcd65d0e tof114c55CompareAugust 23, 2023 10:09
@nicolas-grekas
Copy link
Member

Thank you@Victor-Truhanovich.

@nicolas-grekasnicolas-grekas merged commitbf4ea59 intosymfony:6.3Aug 23, 2023
@Victor-TruhanovichVictor-Truhanovich deleted the fixed_snake_case_nested_attributes_denormalize branchAugust 23, 2023 12:33
@fabpotfabpot mentioned this pull requestAug 26, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasdunglas approved these changes

@mtarldmtarldmtarld approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

5 participants

@Victor-Truhanovich@mtarld@nicolas-grekas@dunglas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp