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

[RFC] Improve error reporting when a message cannot be serialized using Messenger #29163

Open
nicolas-grekas opened this Issue Nov 10, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@nicolas-grekas
Member

nicolas-grekas commented Nov 10, 2018

Related to #29162:

I've had several WTF + hours of debugging to finally understand I had to write my message classes in some idiomatic way to get it through a Messenger transport.

That's been definitely a bad experience to me. I think I'm not the only one going to fall into the trap.
We should find a way to close it. That's a significant DX issue to me. To be resolved in 4.3 I suppose.

Any ideas?

@sroze

This comment has been minimized.

Member

sroze commented Nov 12, 2018

Wouldn’t it be as simple as checking that deserialise(serialise($envelope)) === $envelope before actually sending the envelope (at least in dev)?

@nicolas-grekas

This comment has been minimized.

Member

nicolas-grekas commented Nov 15, 2018

Could be a good start! Maybe serialise($envelope)) === serialize(deserialise(serialise($envelope)))

@sroze

This comment has been minimized.

Member

sroze commented Nov 18, 2018

Yup, it would be better to compare scalars, indeed.

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