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

Fix JSON Dbal type to properly encode whole number float values, preserving zero fractions. #5173

Merged
merged 3 commits into from Jan 11, 2022
Merged

Fix JSON Dbal type to properly encode whole number float values, preserving zero fractions. #5173

merged 3 commits into from Jan 11, 2022

Conversation

Kova101
Copy link

@Kova101 Kova101 commented Jan 10, 2022

Q A
Type bugfix
BC Break no
Fixed issues #5172

Summary

Fixes the zero fraction removal during JSON encoding. It is important for keeping the data integrity and really useful for strongly typed systems (value won't turn to integer during decode).

tests/Types/JsonTest.php Show resolved Hide resolved
tests/Types/JsonTest.php Outdated Show resolved Hide resolved
tests/Types/JsonTest.php Outdated Show resolved Hide resolved
…back testJsonStringConvertsToPHPValue method.
Ocramius
Ocramius previously approved these changes Jan 10, 2022
@derrabus derrabus added this to the 3.2.2 milestone Jan 10, 2022
@derrabus derrabus linked an issue Jan 10, 2022 that may be closed by this pull request
@morozov morozov merged commit 092a3c4 into doctrine:3.2.x Jan 11, 2022
@morozov
Copy link
Member

morozov commented Jan 11, 2022

Thanks, @Kova101.

@Kova101 Kova101 deleted the fix-json-float-zero-preserve branch January 12, 2022 11:30
@Ocramius
Copy link
Member

@morozov is it worth cutting 3.2.2?

@morozov
Copy link
Member

morozov commented Jan 14, 2022

So far, it looks like the only issue solved in the milestone. I don't mind it being released if you need it that bad. But can't you temporarily override the class with a fixed one?

@Ocramius
Copy link
Member

Should be fine - it's just that I drop multiple releases a day, these days, so I'm used to closing a milestone as soon as it is complete.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON float values encoded inproperly, trailing zeros removed
4 participants