-
Notifications
You must be signed in to change notification settings - Fork 29
Symfony 2.8 & 3.0 compatibility #224
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
Conversation
Note : one deprecated notice comes from No tag exists today |
@sescandell I changed some indentations in the list to keep them readable :) |
I found a way to fix that on our side, I'll hand it in next commit |
BC Break: in AppKernel, add `$this` as a parameter to new AdmingeneratorGeneratorBundle() call
ping @loostro , @tobias-93 , @bobvandevijver |
Demo bundle is sync with that branch |
@sescandell we have something like: params: fields: mentors: formType: Admingenerator\FormExtensionsBundle\Form\Type\DoubleListEntityType addFormOptions: query_builder: function ($er) { return $er->createQueryBuilder("m")->join("m.person", "p")->orderBy("p.fullname"); } multiple: true |
@sescandell yes, the use case (problem) embed types were solveing was when Generator A wanted to use a form generated by Generator B (eg. as nested form). Thus, if empty cache, it required to first generate Generator B (only the form types). If it is handled now automatically - then thats a very nice improvement. |
Ok my example is a bit lame (it can be solved using a sortOn), but you get the thing I want to do I hope? |
@tobias-93 OK, I'll set @loostro I'll push a sample in the demo project so we can be sure it is working well |
Except for @loostro @bobvandevijver @tobias-93 do you mind if I set as "deprecated" the |
i'm not sure if it is convert_as_form use: _start_range:
label: Date Range
filterable: true
filterType: s2a_daterange_picker
dbType: date
formOptions:
opens: left
parentEl: div.modal
ranges:
'Next 7 Days': "[moment(), moment().add(6, 'days')]"
'Tomorrow': "[moment().add(1, 'days'), moment().add(1, 'days')]"
'Today': "[moment(), moment()]"
'Yesterday': "[moment().subtract(1, 'days'), moment().subtract(1, 'days')]"
'Last 7 Days': "[moment().subtract(6, 'days'), moment()]"
'Last 30 Days': "[moment().subtract(29, 'days'), moment()]"
'This Month': "[moment().startOf('month'), moment().endOf('month')]"
'Last Month': "[moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]" |
@calvera after PHP inside YML, Javascript! I love to see how other people uses the bundle, we always found some things we never thought about :) Actually, it should not be a Thanks for sharing! |
@sescandell I'm not against deprecating stuff that's either hard to maintain or superseded by better options, but I'm just curious why this needs to be removed. |
No, thanks to @loostro , in the new generator, an We are all agree documentation need improvements. I know @bobvandevijver is working on it. I'll, on my side, work on the demo project too. I've made a mistake removing it. I'll revert this modification (updating how it works, and adding tests). Hopefully, you're all here to check my errors! :) |
@sescandell thanks! |
Wauw, I did not know about that MyModelOptions class... Will add it to my todo list! |
Add tests BC Break: no more type modification BC Break: no more choices specific manipulations
…atorBundle into feat-28comp
I reverted back Is everything OK for you now? |
@sescandell could you add it to the form types again? This way it cannot be used yet... |
Ohh, sorry, it seems I partially commited my changes... I'll push it sunday (not on my personnal computer right now and I'll get it back only Sunday... sorry :/) |
@sescandell no problem. Next week I'll be on holiday so I'll review on the 1st of February. And I must say I never checked Symfony 3.0 so I cannot say anything about the compatibility with that (can only check 2.8 due to low PHP version :( |
Ready for review (again :) ) |
Symfony 2.8 & 3.0 compatibility
Ready to review
Developments:
BC Break
Initialization
The bundle initialization in you
AppKernel
file now need the kernel object as a parameter of the constructor.Embed types
embed_types
in generators is now not anymore necessary. Use the FQCN form name of your generated forms, and everything will be fine!