-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Re-check all form types inherited options #20104
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
Would be easier to maintain, but harder to consume by the user IMHO
Would avoid manual errors, but hard to achieve with versionadded directives, without comparing to older branches I think. |
As a first step of simplification, instead of including the options one by one, could we group them together in a parent class file and include that ? This implies that we can use include in an This would allow, if we take EnumType as an example, to include a file like |
This won't work well with the |
An automated script to sync this doc with its code would be great here. this reminds me that I wrote this project some years ago: https://github.com/phplancer/symfony-form to explore this idea using the with we could run it per Symfony version and generate a diff to know when we should add a the missing part would be how to link each form type and its options with their corresponding documentation… maybe using some naming conventions to load it!? And if the doc doesn't exist, we can always display the option "info" (if provided) as a fallback doc. I can help with this if it works for you, but I’d need to explore the building system first to understand it better. |
Some form types extend other parent types (e.g. CountryType and EnumType extend ChoiceType). In the docs of the child classes, we display all options defined by them and all options defined by their parent types.
However, we handle this manually, so we miss options from time to time (this is a recurrent problem; see #2360).
So, we have two options:
About rethinking:
Thoughts?
The text was updated successfully, but these errors were encountered: