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] Add option to skip uninitialized typed properties#41615

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

@vuryss
Copy link
Contributor

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#40578
LicenseMIT

Adds the ability to skip uninitialized values from Serializer. This is useful when using typed properties in 7.4 and those without default values should not be included in the result.
This works correctly when we're not using serializer groups, but when using the groups - it breaks badly, so it's also kind of a fix in addition to feature.

@vuryssvuryss requested a review fromdunglas as acode ownerJune 8, 2021 11:31
@vuryssvuryssforce-pushed theserializer_skip_uninitialized_40578 branch from5c235b2 tod129544CompareJune 8, 2021 11:58
@nicolas-grekasnicolas-grekas added this to the5.4 milestoneJun 8, 2021
@vuryssvuryssforce-pushed theserializer_skip_uninitialized_40578 branch fromd129544 to9cb2dc3CompareJune 8, 2021 12:42
@carsonbot
Copy link

Hey!

I think@mkrauser has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@vuryssvuryssforce-pushed theserializer_skip_uninitialized_40578 branch 2 times, most recently froma73c938 toc0fb162CompareJune 9, 2021 09:09
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Can you please rebase to trigger the CI again while fixing the review?

@vuryssvuryssforce-pushed theserializer_skip_uninitialized_40578 branch 2 times, most recently from6b733b4 to9cc7bd2CompareSeptember 8, 2021 10:54
@vuryss
Copy link
ContributorAuthor

vuryss commentedSep 8, 2021
edited
Loading

Can you please rebase to trigger the CI again while fixing the review?

Done. Thanks for the help with low deps issue. The failing test now does not seem to have anything in common with my changes.

@vuryssvuryssforce-pushed theserializer_skip_uninitialized_40578 branch from9cc7bd2 to1b9ee7eCompareSeptember 8, 2021 12:51
@derrabus
Copy link
Member

Thank you@vuryss.

dshiryaev-plesk reacted with thumbs up emojivuryss reacted with hooray emoji

@derrabusderrabus merged commita8cc21e intosymfony:5.4Sep 8, 2021
@vuryssvuryss deleted the serializer_skip_uninitialized_40578 branchSeptember 8, 2021 13:46
This was referencedNov 5, 2021
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestOct 26, 2022
…ES option (vuryss, ivannemets-sravniru)This PR was merged into the 5.4 branch.Discussion----------[Serializer] Documenting the new SKIP_UNINITIALIZED_VALUES optionDocuments changes introduced here:symfony/symfony#41615Original issue:symfony/symfony#40578Docs issue:#15785Commits-------08599e8 Update serializer.rst034f0f6 [Serializer] Documenting the new SKIP_UNINITIALIZED_VALUES option
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@derrabusderrabusderrabus approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

[Serializer] Error when normalizing object with uninitialized typed properties when normalizer is loaded with class metadata factory.

4 participants

@vuryss@carsonbot@derrabus@nicolas-grekas

[8]ページ先頭

©2009-2025 Movatter.jp