-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Document the new choice list customization options #5179
Comments
For the reference, there is a blog post about it on symfony.com: http://symfony.com/blog/new-in-symfony-2-7-choice-form-type-refactorization And this has to be added to the choice type reference at least. |
FYI - we should make this a priority. From what I hear, there may be some small gotchas with this refactoring, so we should play with it and update everyone so that when they come looking for docs after upgrading, we're ready :) |
@wouterj @xabbuh I just summarized some of the changes as todos on this issue, mostly looking at the UPGRADE log: https://github.com/symfony/symfony/blob/2.7/UPGRADE-2.7.md#form. There are quite a few things actually, I'm going to do my best to get through some/all of these this week, but any help is appreciated (some may already be done in the docs, if they are, please check them off!) |
@weaverryan Thank you for preparing this quite well! Can you please leave a comment here when you start to work on a particular topic? I have some time this weekend to work on this as well as finishing my pending pull requests and it would be bad if we did the same things twice. ;) |
awesome - I will definitely do that! |
Imho it's a pity that the docs are outdated with the stable release now. It's totally confusing and hard to sort out what's deprecated and what's the new way to do things correctly. :( Especially the |
@althaus We try to do our best to keep up with everything, but we're just volunteers :). And yea, from looking at the new features, part of them look confusing - part of the reason I've got this high on my list. @althaus if you figure any little things out that you think might help one of us when we document the options, please comment them here - it would be much appreciated! |
@weaverryan I know that's all voluntary work and you're doing a great job. It's just sad, that such a big change is lacking the doc it'd need to be that great as it probably will be. I'd be happy to contribute to the docs, but I'm still experimenting with the new options to get my desired results. One thing so far taken from @webmozart blog post:
Perhaps it's just me, but that feels too constructed for me. Just to show what the new features can do. I never needed such a set of choices. Probably just me... ;-) |
One issue showing a cause of confusion: symfony/symfony#14377 So at least I'm not alone on that part. |
Wow, just landed here after an hour or two digging through lots of code, PRs, UPGRADE files and now that blog post. Still have no idea how to proceed :) |
…averryan) This PR was merged into the 2.7 branch. Discussion ---------- Documenting how to keep option value BC - see #14377 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14377 (kinda) | License | MIT | Doc PR | symfony/symfony-docs#5179 Hi guys! I'm still making sense of the form changes, but it seems that this before and after isn't totally honest - your option values will change, unless your add this extra option. @webmozart look correct to you? Thanks! Commits ------- deb9db8 Documenting how to keep option value BC - see #14377
I'm seeking since the 2.7.0 release any information on the |
The lack of documentation about this is becoming a serious issue. |
I agree - we've been way to slow on this. I'll make time this month, but a pull request from anyone who has experience with the new options is very welcome :) |
@weaverryan I've worked quite a lot with the choices stuff and would be willing to do some docs... but most of the time it feels that I'm implementing workarounds to get (back) simple behaviour. So I never know if I'm doing something completely wrong or if @webmozart just thinks in more complex structures. Therefore I think only someone who really knows how the new choices (should) work can do the docs. Especially with the upcoming 3.0 release. :[ |
@althaus I haven't worked with the new choices yet, so I may be in the same situation as you :). I would definitely be interested if you started some of the changes (i.e. just updated the |
@weaverryan No, I haven't started anything yet. Just eagerly waiting for a form crack to jump in. I'm willing to give at least the reference a try and work in the changes from the blog post. That cannot become worse than the current situation. |
@althaus anything you can do would be awesome! And I'll of course either get Bernhard or myself to double-check everything - no worries :). Thanks! |
@weaverryan I've started to implement the basics based on all the information (*) I could found in my fork. As there are some major changes, I'd probably will need some help about correct formatting and usage of tip/caution/deprecated blocks. Is there an easy way that I can render that part of the doc as HTML to check the output from the structured text? (*) taken from: |
@althaus please create a pull request (and prefix the title with |
@wouterj Shouldn't PRs against 2.7 get build automatically? I cannot see platform.sh hooking into my PR. :( |
@althaus It sometimes takes some time. But you should be able to see it now. |
I've just merged the documentation that covers "most" of this - #5876, though it only checks off a few items. I think most of the other items are "easy" - someone just needs to check if we're using old namespaces anywhere, etc. The only one that's still interesting is the first: |
see symfony/symfony#14050 for more details and https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/CHANGELOG.md and https://github.com/symfony/symfony/blob/2.7/UPGRADE-2.7.md#form
choice_list
was deprecated, replaced withchoices_as_values
orchoice_loader
UPGRADE-2.7.md
: You should flip the keys and values of the "choices" option in ChoiceType and set the "choices_as_values" option to true. The default value of that option will be switched to true in Symfony 3.0. (I'm not sure what this actually means). There is also some newchoice_value
option - not sure how it relates.ChoiceListInterface
namespace changedChoiceView
namespace changed AND order of arguments changedChoiceList
was deprecated in favor ofDefaultChoiceListFactory
property
option ofDoctrineType
is nowchoice_label
EntityChoiceList
was deprecated, now useDoctrineChoiceLoader
The text was updated successfully, but these errors were encountered: