MopaBootstrapBundle icon indicating copy to clipboard operation
MopaBootstrapBundle copied to clipboard

Backport deprecation changes for Bootstrap 2

Open carlo1138 opened this issue 9 years ago • 13 comments

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?

carlo1138 avatar Feb 15 '16 03:02 carlo1138

Hi, I would love to see movement on this one!

tarjei avatar Apr 07 '16 10:04 tarjei

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

carlo1138 avatar May 31 '16 20:05 carlo1138

sorry did not see this at all :(

does the testsuite run with symfony3 ? i remember there were some issues.

phiamo avatar May 31 '16 20:05 phiamo

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.

carlo1138 avatar May 31 '16 21:05 carlo1138

What's left to do here? Would love to start using this on 2.x

trsteel88 avatar Jun 08 '16 10:06 trsteel88

can we review this thogether: https://travis-ci.org/phiamo/MopaBootstrapBundle/builds/136118152

phiamo avatar Jun 08 '16 11:06 phiamo

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)"

trsteel88 avatar Jun 09 '16 06:06 trsteel88

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

carlo1138 avatar Jun 09 '16 07:06 carlo1138

@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.

carlo1138 avatar Jun 09 '16 07:06 carlo1138

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

trsteel88 avatar Jun 09 '16 10:06 trsteel88

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 avatar Jun 09 '16 10:06 trsteel88

@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 avatar Jun 11 '16 22:06 carlo1138

@carlo1138 what is the status here?

phiamo avatar Feb 03 '17 14:02 phiamo