-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
[Form] ChoiceType error after upgrade to 3.0.4 #18461
Comments
Hi @walczakmac, thank you for reporting this. This option stands for the submitted data (the string selected from the html form) and will be matched in the This can be a "BC break", however this is the way it is supposed to happen, as far as I understand. If I'm wrong, please submit a PR to fix this regression. In any case sorry for the trouble |
In fact that the casting was done at this line 3eac469#diff-81585954baecb0c458557b7969974093R46 and is useless with that change. Because it should always be a string. In contrary, to pre select the choice, the option So I suggest to open a PR anyway, either to remove the useless ping @webmozart @walczakmac Would you like to handle it ? |
ping @Tobion :) |
@HeahDude Yes i can open a PR to fix that. I'll revert that change becase it's a BC break IMO and shouldn't be introduced in minor version. |
Should be closed by symfony/symfony-docs#6340. |
As mentioned in #18462 I'm closing this. |
This cost me upwards of 2 hours today. Whatever was wrong with PHP type juggling I wonder... if I'd thought it to be a problem, I'd be using a strongly typed language. |
I just upgraded to Symfony 3.0.4 and I can't set integers as choice values in ChoiceType field. Validation gives me "This value is not valid." message for an integer value. In my case it was default value passed through "empty_data" option.
Here is example field I use to reproduce this:
I found out that this is caused by this change: 3eac469#diff-81585954baecb0c458557b7969974093L42
The text was updated successfully, but these errors were encountered: