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

Array to string conversion #14

Closed
enumag opened this issue Oct 20, 2021 · 4 comments · Fixed by #17
Closed

Array to string conversion #14

enumag opened this issue Oct 20, 2021 · 4 comments · Fixed by #17

Comments

@enumag
Copy link

enumag commented Oct 20, 2021

Found a bug. I accidentally had {} in place of an uuid in request payload and deserialization failed on array to string conversion here:

return $this->deserializeUuidValue((string) $data);

@mhujer
Copy link
Owner

mhujer commented Oct 30, 2021

@enumag thanks for the report, I will fix it later. It would be easier to fix after I drop support for PHP <8.0, so I can use Stringable (5d91e18)

@enumag
Copy link
Author

enumag commented Oct 30, 2021

I would have sent a PR with a fix but I'm unsure how to handle the exceptions since DeserializationInvalidValueException requires a previous one and InvalidUuidException requires invalid value as string. There clearly needs to be some change here but not exactly sure what.

@mhujer
Copy link
Owner

mhujer commented Dec 7, 2021

@enumag fixed in #17 and release as 3.4.1.

btw. while I was checking how is this check implemented in the JMS serializer itself I realized that it isn't and DateTime deserializer emits "array to string conversion" in the similar situation.

@enumag
Copy link
Author

enumag commented Dec 7, 2021

Thanks! I reported that too then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants