CodeIgniter Forums
Moving from Codeigniter 3 to Codeigniter 4 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forum-9.html)
+--- Thread: Moving from Codeigniter 3 to Codeigniter 4 (/thread-80702.html)



Moving from Codeigniter 3 to Codeigniter 4 - Dina_Az - 12-05-2021

Hello!

We have a web app which is written in Ci3. I have gone through the Ci4 docs and a lot has changed and its going to be a lot of work to get the migration working.
My question is ----- In ci4 I noticed that a model represents a row and you can put db restrictions etc. However, we have not done it that was in ci3 (don't think this feature was there) so, if we were to move our model functions over and do the right naming etc. do you think this will work?
I am trying to gauge how much work will be involved in the migration. I guess I am going to try it over the weekend but I thought I'd ask here as well just in case someone has done the migration.
So, move our files over. Change naming conventions and how views are called etc...is that the minimum work required?

Thanks in advance!


RE: Moving from Codeigniter 3 to Codeigniter 4 - kenjis - 12-06-2021

CodeIgniter 3 to 4 Upgrade Helper might help you.
https://github.com/kenjis/ci3-to-4-upgrade-helper


RE: Moving from Codeigniter 3 to Codeigniter 4 - Dina_Az - 12-20-2021

(12-05-2021, 10:45 PM)Dina_Az Wrote: Hello!

We have a web app which is written in Ci3. I have gone through the Ci4 docs and a lot has changed and its going to be a lot of work to get the migration working.
My question is ----- In ci4 I noticed that a model represents a row and you can put db restrictions etc. However, we have not done it that was in ci3 (don't think this feature was there) so, if we were to move our model functions over and do the right naming etc. do you think this will work?
I am trying to gauge how much work will be involved in the migration. I guess I am going to try it over the weekend but I thought I'd ask here as well just in case someone has done the migration.
So, move our files over. Change naming conventions and how views are called etc...is that the minimum work required?

Thanks in advance!



RE: Moving from Codeigniter 3 to Codeigniter 4 - Dina_Az - 12-20-2021

(12-06-2021, 01:45 AM)kenjis Wrote: CodeIgniter 3 to 4 Upgrade Helper might help you.
https://github.com/kenjis/ci3-to-4-upgrade-helper
the logic would remain the same and only the syntax/naming etc would change? Or the change is much much bigger?


RE: Moving from Codeigniter 3 to Codeigniter 4 - kenjis - 12-20-2021

It is a package that provides CI3 compatible interfaces.
If you use it, you might go to CI4 quickly. It is not the official and does not support full CI3 API.

If you want to know the real tasks to migrate CI4, reading the latest user guide helps you.
https://codeigniter.com/user_guide/installation/upgrade_4xx.html

And I recommend you try to migrate one controller.


RE: Moving from Codeigniter 3 to Codeigniter 4 - tiffany31 - 01-10-2022

 It is not the official and does not support full CI3 API.