Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Merged
nicolas-grekas merged 1 commit intosymfony:6.3fromHypeMC:fix-maprequestpayload-returns-full-violationslistDec 18, 2023
Merged
[HttpKernel] Don't validate partially denormalized object#53107
nicolas-grekas merged 1 commit intosymfony:6.3fromHypeMC:fix-maprequestpayload-returns-full-violationslistDec 18, 2023
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This was referencedDec 17, 2023
mtarld approved these changesDec 18, 2023
src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Member
nicolas-grekas commentedDec 18, 2023
Thank you@HypeMC. |
Merged
This was referencedDec 30, 2023
Merged
Merged
Merged
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
1 task
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When one or more required constructor arguments are missing, the object is instantiated with
newInstanceWithoutConstructor():symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
Lines 415 to 421 in0af28a0
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 the
PartialDenormalizationException.