Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type #47169

Merged
merged 1 commit into from Aug 3, 2022

Conversation

norkunas
Copy link
Contributor

@norkunas norkunas commented Aug 3, 2022

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

Currently it's possible to catch most errors with serializer when using DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true but there was no tests trying to deserialize list of objects with an invalid value.

So it failed my expectations, because in an api using serializer, consumers could get 500 instead of the proper response, therefore I've submit this as a bugfix.

@norkunas norkunas force-pushed the fix-array-denormalizer branch from cfef3ac to 6337bfd Compare Aug 3, 2022
@nicolas-grekas nicolas-grekas changed the base branch from 6.2 to 5.4 Aug 3, 2022
@nicolas-grekas nicolas-grekas modified the milestones: 6.2, 5.4 Aug 3, 2022
fabpot
fabpot approved these changes Aug 3, 2022
@fabpot
Copy link
Member

fabpot commented Aug 3, 2022

Thank you @norkunas.

@fabpot fabpot merged commit 12ea6e2 into symfony:5.4 Aug 3, 2022
5 of 9 checks passed
@norkunas norkunas deleted the fix-array-denormalizer branch Aug 3, 2022
This was referenced Aug 26, 2022
@fabpot fabpot mentioned this pull request Sep 30, 2022
@NorthBlue333
Copy link

NorthBlue333 commented Oct 8, 2022

Fixes #46649.

Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants