-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[OptionsResolver] Is it possible to allow/ignore extra options? #22536
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
Comments
Yes :) |
so simple it made me laugh :)) very PHPish :) |
Came here via Google. Adding them to Our use case instead is to allow extra options without the |
Agree with @rvanlaak With this answer I define all options in all places where set of options are used or prepare them each time before I use them but it makes no sense to use OptionsResolver after I'd already prepared them |
For those who googled this page. |
I have an array of options that has a subset that needs resolving, the rest of it is not important. Is it possible to ignore the rest of the array?
A similar behavior to Form allow_extra_fields
Example: email and phone are required, everything else just doesn't matter.
This obviously yields
UndefinedOptionsException
The text was updated successfully, but these errors were encountered: