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 denormalizing union types#45838

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
nicolas-grekas merged 1 commit intosymfony:4.4fromT-bond:ticket_45818
Mar 24, 2022
Merged

[Serializer] Fix denormalizing union types#45838

nicolas-grekas merged 1 commit intosymfony:4.4fromT-bond:ticket_45818
Mar 24, 2022

Conversation

@T-bond
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#45818
LicenseMIT
Doc PR-

@nicolas-grekas Replaces:#45824 as I accidentally registerred a lot of people to the notifier list when changing target branch.

Note about difference between docblock vs PHP 8 union types:
With PHP 8 union types, the resolved$types array was always (when I checked) in the same order, no matter the type definition.
So these two things:public null|boolean|DateTime andpublic DateTime|boolean|null wouldalways generate an array, where thefirst item wasDateTime.

With PHP docblock the$tpyes array order depends of the order of the documentation.
So the* @var \DateTime|bool|null would resolve to an array withDateTime asfirst item, but the* @var null|bool|\DateTime would resolve to theDateTime being thelast element.

Copy link
ContributorAuthor

@T-bondT-bond left a comment
edited
Loading

Choose a reason for hiding this comment

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

Self review done. All checks have passed.

Again, thanks for this great software! :)

Status: Reviewed

@nicolas-grekasnicolas-grekas changed the title[Serializer] Allow denormalizingunion types properly[Serializer] Fix denormalizing union typesMar 24, 2022
@nicolas-grekas
Copy link
Member

Thank you@T-bond.

T-bond reacted with heart emoji

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

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

3 participants

@T-bond@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp