Skip to content

[Messenger] Fix ErrorDetailsStamp denormalization #41378

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

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

wucdbm
Copy link
Contributor

@wucdbm wucdbm commented May 22, 2021

Q A
Branch? 5.2.1+
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #39689
License MIT
Doc PR symfony/symfony-docs#...

Fixes #39689

Trouble is, tests did not cover cases where a PropertyTypeExtractorInterface is used, in conjunction with a variable type such as int|mixed

IMO this does not really fix the issue with the Serializer component, it being that if we have mixed, we should really be allowing anything. Another point is whether that type makes sense and shouldn't be just mixed instead.

I've changed it to int|string as in that context, those are the possible types, string being rather rare. I suspect a PDO Exception as I've had those in the past, there was a similar bug with FlattenException. This was a nightmare to debug/reproduce because it happened once a fortnight in production.

@wucdbm wucdbm requested a review from sroze as a code owner May 22, 2021 01:50
@wucdbm wucdbm changed the title Fix error details stamp denormalization [Messenger][Serializer] Fix ErrorDetailsStamp denormalization May 22, 2021
@wucdbm
Copy link
Contributor Author

wucdbm commented May 22, 2021

Should we rely on ReflectionExtractor only for this test?

@nicolas-grekas nicolas-grekas added this to the 5.2 milestone May 22, 2021
@carsonbot
Copy link

Hey!

I think @TimoBakx has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@wucdbm
Copy link
Contributor Author

wucdbm commented Jul 23, 2021

@nicolas-grekas Ping on this one, still happens in production for us every now and then - let's get this reviewed and possibly merged.

@fabpot fabpot modified the milestones: 5.2, 5.3 Jul 26, 2021
@OskarStark OskarStark changed the title [Messenger][Serializer] Fix ErrorDetailsStamp denormalization [Messenger][Serializer] Fix ErrorDetailsStamp denormalization Aug 1, 2021
@OskarStark OskarStark changed the title [Messenger][Serializer] Fix ErrorDetailsStamp denormalization [Messenger] Fix ErrorDetailsStamp denormalization Aug 1, 2021
@fabpot
Copy link
Member

fabpot commented Aug 26, 2021

Looks reasonable to me (should be done on 5.3 instead of 5.4 though).

@fabpot fabpot changed the base branch from 5.4 to 5.3 August 26, 2021 07:40
@fabpot fabpot force-pushed the fix-error-details-stamp-denormalization branch from b323d3a to 09eec5e Compare August 26, 2021 07:41
@fabpot
Copy link
Member

fabpot commented Aug 26, 2021

Thank you @wucdbm.

@fabpot fabpot merged commit 4d5edae into symfony:5.3 Aug 26, 2021
@fabpot fabpot mentioned this pull request Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Messenger][Serializer] Message Deserialization Failed
5 participants