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 support of PHP backed enumerations#40830

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

@alexandre-daubois
Copy link
Member

@alexandre-dauboisalexandre-daubois commentedApr 15, 2021
edited
Loading

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#40241
LicenseMIT
Doc PRnone

Capture d’écran du 2021-04-15 21-41-51

dunglas, bpolaszek, and Zeryther reacted with thumbs up emojiOskarStark, bpolaszek, and sstok reacted with heart emojiOskarStark, chalasr, derrabus, bpolaszek, and sstok reacted with rocket emoji
Copy link
Member

@jderussejderusse left a comment

Choose a reason for hiding this comment

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

Why only BackedEnum? can't we also normalize Enum via Reflexion?

@alexandre-daubois
Copy link
MemberAuthor

alexandre-daubois commentedApr 15, 2021
edited
Loading

Thank you for your reviews!

Why only BackedEnum? can't we also normalize Enum via Reflexion?

@stofcommented in the original ticket#40241 that we should only create this normalizer forBackedEnum, as serializing pure enum case would be better with a custom normalizer. Do you think that it would be better to create someUnitEnumNormalizer too?

I would go with 5.4 but we need to add a php version id check somewhere monocle_face

Edit: added version check ind8298fa

@alexandre-dauboisalexandre-dauboisforce-pushed thefeat-backed-enum-normalizer branch 6 times, most recently from29b08fe to7d9709eCompareApril 16, 2021 13:21
@alexandre-daubois
Copy link
MemberAuthor

Changed@requires PHP 8.1 annotations after@derrabus comment on#40857 (comment)

derrabus reacted with thumbs up emoji

@alexandre-dauboisalexandre-daubois changed the title[Serializer] Add support of PHP 8.1 backed enumerations[Serializer] Add support of PHP backed enumerationsJun 4, 2021
@alexandre-dauboisalexandre-dauboisforce-pushed thefeat-backed-enum-normalizer branch frome7c1a97 toca6abf6CompareJune 4, 2021 06:44
@alexandre-dauboisalexandre-dauboisforce-pushed thefeat-backed-enum-normalizer branch fromca6abf6 to0872747CompareJune 23, 2021 05:21
@alexandre-dauboisalexandre-daubois changed the base branch from5.3 to4.4June 23, 2021 05:21
@alexandre-daubois
Copy link
MemberAuthor

Rebased to 4.4, as it is considered a bug fix. How to deal with the change of configuration format, going from XML to PHP configuration in latest Symfony version?

@nicolas-grekas
Copy link
Member

Thanks. We'll deal with it while merging up.

alexandre-daubois reacted with thumbs up emoji

Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

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

As it adds a new class to support it, I would say this is out of the "merge in 4.4 to support a new PHP version". I think it qualifies as a new feature, so for 5.4.

ogizanagi, dunglas, and sstok reacted with thumbs up emoji
@alexandre-dauboisalexandre-daubois changed the base branch from4.4 to5.4July 5, 2021 11:22
@alexandre-dauboisalexandre-dauboisforce-pushed thefeat-backed-enum-normalizer branch frome9ed1e8 to3458e0eCompareJuly 5, 2021 11:22
@alexandre-dauboisalexandre-daubois changed the base branch from5.4 to4.4July 5, 2021 11:26
@alexandre-dauboisalexandre-daubois changed the base branch from4.4 to5.4July 5, 2021 11:28
@alexandre-daubois
Copy link
MemberAuthor

Alright! Rebase to 5.4 is done

@fabpot
Copy link
Member

Thank you@alexandre-daubois.

@fabpotfabpot merged commit61f26b6 intosymfony:5.4Jul 5, 2021
This was referencedNov 5, 2021
nicolas-grekas added a commit that referenced this pull requestAug 17, 2022
This PR was merged into the 5.4 branch.Discussion----------Add missing types to BackedEnumNormalizer| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Spotted while reviewing#47296Not sure why we missed adding them in#40830 🤷Commits-------60d6325 [Serializer] Add missing types to BackedEnumNormalizer
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasdunglas left review comments

@stofstofstof requested changes

@jderussejderussejderusse left review comments

@OskarStarkOskarStarkOskarStark left review comments

@fabpotfabpotfabpot approved these changes

@derrabusderrabusderrabus approved these changes

@chalasrchalasrAwaiting requested review from chalasr

@lyrixxlyrixxAwaiting requested review from lyrixx

@srozesrozeAwaiting requested review from sroze

@wouterjwouterjAwaiting requested review from wouterj

@xabbuhxabbuhAwaiting requested review from xabbuh

@ycerutoycerutoAwaiting requested review from yceruto

+1 more reviewer

@maxheliasmaxheliasmaxhelias approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

[Serializer] Support for PHP 8.1 enums

10 participants

@alexandre-daubois@nicolas-grekas@fabpot@dunglas@stof@jderusse@OskarStark@derrabus@maxhelias@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp