-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[WIP] Update form choice type reference (refs #5179) #5847
Conversation
Perfect. I just found out, that https://github.com/symfony/doctrine-bridge/blob/2.7/Form/Type/DoctrineType.php#L135 actually makes use of the A possible reference for "before/after" sections might be: https://gist.github.com/mickaelandrieu/5211d0047e7a6fbff925#form (the part about |
|
||
The ``choices_as_values`` option of ChoiceType was introduced in Symfony 2.7. | ||
|
||
The ``choices_as_values`` option was introduced to ensure backward compatibility with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lines or this paragraph are a bit too long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javiereguiluz What's the official line length? Seems I'm blind as I cannot find anything in the contribution guide. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually break lines after the first word that crosses the 72nd character: http://symfony.com/doc/current/contributing/documentation/standards.html#sphinx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xabbuh Thanks. Just pushed an update to fix this.
@weaverryan Check! |
…weaverryan) This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #5876). Discussion ---------- Symfony 2.7 Form choice option update Hi guys! This replaces #5755 #5847 and should close #5179 (or at least covers most things). | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | 2.7+ | Fixed tickets | #5179 This is a big change, and I rewrote a lot. If you have time to review, I think it's best to read the published version up platform.sh and check the code for validity. You can see the code in a project that inspired all the examples here: https://github.com/weaverryan/form_choices/tree/finished. Commits ------- b55d170 typo! 70f5e85 tweaks thanks to comments 0ad7b18 fixing wrong image name 69fc3c3 removing scaling on images a2ad990 fixing bad reference 7aa4106 Completely re-working all the choice docs, including screenshots - for 2.7 changes 79c905c changing option order - choice_name and choice_value seem like edge cases 68725e8 Fixed preferred choices example e2dea88 Fixed linebreaking 889f123 Added choices_as_values description [amend] e1f583b Added choices_as_values description d3cf004 Added choice_loader basics 3763f71 Added basic choice type changes fd35e21 Fix docs related with choice form type refactor
This PR aims to document the changes to the form choice type introduced in Symfony 2.7