-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
check empty_data in choices of ChoiceType #25899
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
If it's a BC break then you should deprecate the behaviour for 4.1 and then do it for 5.0. |
As written in the referenced ticket you could deprecate the ability for a string to be handled as a callable (you can take a look at the |
Is it too early to talk about a release 5.0? I certainly agree that a violation of BC is bad. |
We know that Symfony 5.0 will be released in November 2019. And if we deprecate something in 4.1 to 4.4, we also know that we will remove this feature in 5.0. I think we are talking about different things when talking about the deprecation. I do not want to deprecate the ability to use a callable entirely. What we should deprecate IMO is the possibility to pass a callable as a string as this can be ambiguous as you said. So in the future, if you want to make use of a callable, you would need to use an anonymous function. |
@xabbuh apparently i did not understand you. |
Exactly, you may want to take a look at #18020 where we did something similar in the past. |
If
empty_data
is callable, search it in choices. May be it is not a really callable data.I don't exclude the probability of violation of BC.