0

We are upgrading our CakePHP 3 project to CakePHP 4 because we need to support PHP 8.1.

We are also using https://github.com/FriendsOfCake/bootstrap-ui plugin's HTML/Flash/FormHelpers to generate Bootstrap 3 styled HTML. We do not need the bake functionalities of the library, only the helpers.

The newer versions that are for CakePHP 4 core are using either Bootstrap 4 or 5. So do you guys have any ideas on how to migrate our project so we don't need to upgrade from Bootstrap 3?

I tried finding information about this but there is not really that much. Upgrading from Bootstrap 3 to 4 would cause rewriting huge amount of our HTML also.

ArtoS
  • 1

1 Answers1

0

You could try to configure the helper's template's to make the output Bootstrap 3 compatible, and possibly extend the plugin helpers to add/change functionality where necessary and possible.

If that doesn't suffice, then another option could be to use your own fork of friendsofcake/bootstrap-ui, either from the 1.x branch which you could try to make compatible with CakePHP 4, or from the 3.x branch which you can try to make compatible with Bootstrap 3.

I can't really tell you which one would be easier, you should probably expect having to invest quite some time into it either way.

ndm
  • 59,784
  • 9
  • 71
  • 110
  • Yeah I was thinking of either forking but really don't have a clue how much work would it be to make 1.x Cake 4 and PHP 8 compatible, or "downgrade" 3.x to output Bootstrap 3 styled HTML. One thing is to remove the plugin and make my own custom templates but there was not that much information about that in the documentation. – ArtoS Nov 28 '22 at 11:44
  • Do you think it would make sense to use the new version of the plugin and upgrade our project from Bootstrap to Bootstrap 4/5? Lots of template files to change but would be more future proof and more straightforward process than trying forking or custom templates? – ArtoS Nov 28 '22 at 11:51