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] backed enum throw notNormalizableValueException outside construct method#50192

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

@alli83
Copy link
Contributor

@alli83alli83 commentedApr 28, 2023
edited
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets#47128 (comment)
LicenseMIT
Doc PR

PR#47128 (comment) was aiming to throw an InvalidArgumentException if a constructor's argument is not a valid backedEnum( knowing an error will be thrown in all case e.g when it will be instantiated).

This PR aims to throw a NotNormalizableValueException (like it was the case before) if an error occurs on an BackedEnum outside the case of the first PR

So we have two different types of exceptions depending on whether it's an error at the constructor level or not.

@alli83alli83 requested a review fromdunglas as acode ownerApril 28, 2023 21:38
@carsonbotcarsonbot added this to the5.4 milestoneApr 28, 2023
@alli83alli83force-pushed theserializer-backedEnum-throw-not-normalizable-value-exception-outside-construct-method branch 2 times, most recently from897da96 to53fd29dCompareApril 28, 2023 21:41
Copy link

@TerjeBrTerjeBr left a comment

Choose a reason for hiding this comment

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

Looks good, but missing all the data in the NotNormalizableValueException that makes it useful.

@carsonbotcarsonbot changed the titleSerializer backed enum throw notNormalizableValueException outside construct method[Serializer] Serializer backed enum throw notNormalizableValueException outside construct methodMay 2, 2023
@nicolas-grekasnicolas-grekas changed the title[Serializer] Serializer backed enum throw notNormalizableValueException outside construct method[Serializer] backed enum throw notNormalizableValueException outside construct methodMay 2, 2023
@alli83alli83force-pushed theserializer-backedEnum-throw-not-normalizable-value-exception-outside-construct-method branch from53fd29d to5549493CompareMay 2, 2023 16:56
Copy link

@TerjeBrTerjeBr left a comment

Choose a reason for hiding this comment

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

Looks good to me

@fabpot
Copy link
Member

Thank you@alli83.

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

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

+1 more reviewer

@TerjeBrTerjeBrTerjeBr 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.

6 participants

@alli83@fabpot@nicolas-grekas@TerjeBr@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp