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

Add new option to MoneyType #50707

Closed
garak opened this issue Jun 19, 2023 · 0 comments · Fixed by #51884
Closed

Add new option to MoneyType #50707

garak opened this issue Jun 19, 2023 · 0 comments · Fixed by #51884

Comments

@garak
Copy link
Contributor

garak commented Jun 19, 2023

Description

Currently, the MoneyType in the Form component is forcing the value to a float, using a data transformer.
This cannot be very pleasant when using that type with some external library, like the most famous moneyphp, which requires the value to be an integer.
My proposal is to add a new option (a possible name could be "format"), so the user is not forced to re-cast every value before using it with the Money class. Using "float" as the default of this new option can ensure a full BC.

Example

No response

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