Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Config] Allow validating values using callables in ExprBuilder#19578
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedAug 9, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As you spotted, it's a BC break, forbidden by our written policy. 👎 |
ro0NL commentedAug 9, 2016
Somewhere it is a shame this cant target 4.x :( the change itself is good imho. |
This PR is a proposal for adding the ability to pass any callable for validating values using the ExprBuilder, which accepts only closures ATM.
The problem with closures is they often involve to write redundant code such as useless assignments or intermediate methods or lots of arguments in the
use()part of the closure, as soon as the validation logic is decoupled from the configuration for instance.Before
After
It is a BC break but IMHO it worths it, ATM I don't see any use case where this would have a negative impact, except when overriding the changed methods (never saw such case).