-
Notifications
You must be signed in to change notification settings - Fork 92
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
Problem with cents in v6.5.1 #123
Comments
We had the same problem, although this was just a general composer update for us, not expecting any code breaking or significant changes from it so this caught us out by surprise until it was reported. |
Same problem here. |
Same problem |
Hi @quintavallechristian |
This problem only occurs with float's. In v6.4.0 this was the behavior:
In v6.5.1:
|
Actually, this is expected now Because 250 is not equal to (2.50 * 100) = 250.0 We have different treatments for integers and floating And with that the option Maybe this should have been a breaking change and released v7 🤔 |
If that is expected now, it is indeed a breaking change and better suited for a new major version. |
I treated this as a fix In v6.4.0 @money(2.50 * 101) = $2.52 // wrong In v6.5.1: @money(2.50 * 101) = $252.50 // right |
I will remove the latest versions and release v7 |
Sorry for the trouble with the floating values |
This was indeed a breaking change. Our app reports significant numeric changes to our clients and suddenly we generated quite a number of notifications because all figures suddenly went up by x100. :) We need to add more testing. |
why this should be wrong? |
Updating to the last version (coming from 3.8) I noticed all the amounts in my application multiplied by 100. It seems like the format() function does not divide by 100 anymore, so if I pass a value of 100 it will print 100 € (or whatever currency I set).
Rolling back to version 6.4.0 the problem disappears
The text was updated successfully, but these errors were encountered: