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

[HttpKernel] Don't validate partially denormalized object#53107

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

@HypeMC
Copy link
Member

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

When one or more required constructor arguments are missing, the object is instantiated withnewInstanceWithoutConstructor():

}catch (\TypeError$e) {
if (!isset($context['not_normalizable_value_exceptions'])) {
throw$e;
}
return$reflectionClass->newInstanceWithoutConstructor();
}

Since this means that all properties are empty, validating the entire object is unnecessary. This PR suggests avoiding the call to the validator when violations have already been identified through thePartialDenormalizationException.

@nicolas-grekas
Copy link
Member

Thank you@HypeMC.

@nicolas-grekasnicolas-grekas merged commiteef0d54 intosymfony:6.3Dec 18, 2023
@HypeMCHypeMC deleted the fix-maprequestpayload-returns-full-violationslist branchDecember 18, 2023 13:55
@xabbuhxabbuh mentioned this pull requestDec 19, 2023
This was referencedDec 30, 2023
nicolas-grekas added a commit that referenced this pull requestJan 2, 2024
This PR was merged into the 5.4 branch.Discussion----------[Serializer] Fix using deserialization path 5.4| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        | -| License       | MITI've noticed this while working on#53107.Sometimes, the `path` provided to the `NotNormalizableValueException` is incorrect.Commits-------d498de7 [Serializer] Fix using deserialization path
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

@mtarldmtarldmtarld approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

4 participants

@HypeMC@nicolas-grekas@mtarld@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp