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

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Moving from Codeigniter 3 to Codeigniter 4 (/showthread.php?tid=80702)

Pages: 1 2


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.


RE: Moving from Codeigniter 3 to Codeigniter 4 - bikebetty - 07-08-2022

(12-20-2021, 10:53 PM)kenjis Wrote: 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.

Can you explain a little bit more how to use this? I download your file and I have my file...then I do what exactly? I'm so new and I have so much to learn.


RE: Moving from Codeigniter 3 to Codeigniter 4 - kenjis - 07-09-2022

See https://github.com/kenjis/ci3-to-4-upgrade-helper/blob/1.x/docs/HowToUpgradeFromCI3ToCI4.md


RE: Moving from Codeigniter 3 to Codeigniter 4 - bikebetty - 07-10-2022

(07-09-2022, 04:41 PM)kenjis Wrote: See https://github.com/kenjis/ci3-to-4-upgrade-helper/blob/1.x/docs/HowToUpgradeFromCI3ToCI4.md
So tell me if I'm understanding...I'm moving files from the ci3 file that I have...into your file that I've downloaded. 

I've taken a job and their website guy is AWOL, but they want a new client portal so here I am tossed into the newness of web design.


RE: Moving from Codeigniter 3 to Codeigniter 4 - kenjis - 07-10-2022

You need to
1. Create new CI4 project https://github.com/kenjis/ci3-to-4-upgrade-helper/blob/1.x/docs/HowToUpgradeFromCI3ToCI4.md#install-codeigniter4
2 Install ci3-to-4-upgrade-helper in the CI4 project https://github.com/kenjis/ci3-to-4-upgrade-helper/blob/1.x/docs/HowToUpgradeFromCI3ToCI4.md#install-ci3-to-4-upgrade-helper
3. Copy CI3 project files into the CI4 project and modify them