-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] accept floats for input="string" in NumberType #32125
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
Conversation
xabbuh
commented
Jun 20, 2019
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 4.3 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #31905, #32124 |
License | MIT |
Doc PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
src/Symfony/Component/Form/Extension/Core/DataTransformer/StringToFloatTransformer.php
Outdated
Show resolved
Hide resolved
Shouldn't we trigger a deprecation here so users actually uses string instead of floats in their entities? |
I have updated the code a bit. The changes made for the This allows us to deprecate the behaviour with a better message in 4.4 as suggested in #32125 (comment) and we do not need to weaken the |
…ype (xabbuh) This PR was merged into the 4.4 branch. Discussion ---------- [Form] deprecate int/float for string input in NumberType | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #32125 (comment) | License | MIT | Doc PR | Commits ------- d8c008a deprecate int/float for string input in NumberType
Thank you @xabbuh. |
…buh) This PR was merged into the 4.3 branch. Discussion ---------- [Form] accept floats for input="string" in NumberType | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31905, #32124 | License | MIT | Doc PR | Commits ------- 2abf855 accept floats for input="string" in NumberType