MopaBootstrapBundle
MopaBootstrapBundle copied to clipboard
Backport deprecation changes for Bootstrap 2
Similar to #1115 but with support for Symfony 2.3
- [x] Ported test suite and adapted to Bootstrap 2
- [x] Ported deprecation changes from master
- [x] Configured travis
What do you think?
Hi, I would love to see movement on this one!
My plan was to add more tests, but I don't have much time now (I've already added some). Anyway I'm using my fork in a Symfony 2.7 project + Bootstrap 2, so I would like to have a feedback on this PR
sorry did not see this at all :(
does the testsuite run with symfony3 ? i remember there were some issues.
does the testsuite run with symfony3 ? i remember there were some issues.
Now it's passing, but I haven't ported all the tests form master, some were not compatible.
What's left to do here? Would love to start using this on 2.x
can we review this thogether: https://travis-ci.org/phiamo/MopaBootstrapBundle/builds/136118152
I can't seem to find @carlo1138 branch to make changes. I've had to checkout the actual commit.
All of the config yml files should wrap parameters with quotes. From 4.0 exceptions will be thrown.
Also, if you actually run this version, it fails. The extensions are wrong:
mopa.form.help_extension:
class: Mopa\Bundle\BootstrapBundle\Form\Extension\HelpFormTypeExtension
arguments:
- { tooltip_icon: %mopa_bootstrap.form.tooltip.icon%, tooltip_placement: %mopa_bootstrap.form.tooltip.placement% }
tags:
- { name: form.type_extension, alias: form }
Should be
- { name: form.type_extension, _extended_type: Symfony\Component\Form\Extension\Core\Type\FormType_ }
Also, some Types haven't been updated. e.g. TabType still has "public function setDefaultOptions(OptionsResolverInterface $resolver)"
All of the config yml files should wrap parameters with quotes. From 4.0 exceptions will be thrown.
Do we need to support 4.0? 😄
Should be { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\FormType }
In which version?
Also, some Types haven't been updated. e.g. TabType still has "public function setDefaultOptions(OptionsResolverInterface $resolver)"
Yep, if we want both 2.x and 3.x support, we need to use both methods, like it was suggested in https://github.com/phiamo/MopaBootstrapBundle/pull/1115#issuecomment-158128315
Now I've rebased my branch with a new travis.yml, it's not the same as your v2.3.x, but similar https://travis-ci.org/carlo1138/MopaBootstrapBundle/builds/136356781 I've removed symfony < 2.3.x, and excluded php < 5.5 for symfony > 2.8
@trsteel88
Should be { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\FormType }
In which version?
Also, some Types haven't been updated. e.g. TabType still has "public function setDefaultOptions(OptionsResolverInterface $resolver)"
Yep, if we want both 2.x and 3.x support, we need to use both methods, like it was suggested in #1115 (comment)
LOL, I had already done both of them, I've just forgot about it, see f6a4a12. There is a BC layer to support all the symfony versions.
Some types seem to still be missing the bc. See
https://github.com/phiamo/MopaBootstrapBundle/blob/f6a4a12f99ecebf57e0249cb63b99465abf57394/Form/Type/TabType.php
https://github.com/phiamo/MopaBootstrapBundle/blob/f6a4a12f99ecebf57e0249cb63b99465abf57394/Form/Type/TabsType.php
Form aliases are deprecated and will be removed in 3.0. You must use the Fully Qualified Class Names instead of form aliases now.
@trsteel88
Some types seem to still be missing the bc. See ... Form aliases are deprecated and will be removed in 3.0. You must use the Fully Qualified Class Names instead of form aliases now.
Done
@phiamo
I'm trying to add a test for tabs, but they don't render properly, it seems like you deleted the rendering functions in d7753ff from fields.html.twig
. Can you help me understand what's wrong?
@carlo1138 what is the status here?