CodeIgniter Forums
How to make my app an CI4 from CI3? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: How to make my app an CI4 from CI3? (/showthread.php?tid=78385)



How to make my app an CI4 from CI3? - yuma2020 - 01-11-2021

Hello community, I am a developer who is of the old CI3, I would like a tip that I should learn to adapt my CI3 projects to adapt it to CI4. I simply ask this user who seeks to update their applications and does not understand much it is always very useful to understand that I must learn to adapt everything to the new framework.

From now on community I await your prompt response cordial greetings to all.


RE: How to make my app an CI4 from CI3? - php_rocs - 01-12-2021

@yuma2020,

Have you read the documentation https://codeigniter.com/user_guide/installation/upgrade_4xx.html?


RE: How to make my app an CI4 from CI3? - demyr - 01-12-2021

You need to code again your projects. However, the basic understanding is similar.
  • There are some differences with Controller as well: You can send header and footer on Controller: View Part on User Guide
  • Also Redirect line within your controller is a bit different

    return redirect()->to($_SERVER['HTTP_REFERER']); // It  an example of redirect to the same page. You can even send a message: Redirect Page On User Guide
  • Be careful with the namespaces.



RE: How to make my app an CI4 from CI3? - yuma2020 - 01-14-2021

(01-12-2021, 07:34 AM)demyr Wrote: You need to code again your projects. However, the basic understanding is similar.
  • There are some differences with Controller as well: You can send header and footer on Controller: View Part on User Guide
  • Also Redirect line within your controller is a bit different

    return redirect()->to($_SERVER['HTTP_REFERER']); // It  an example of redirect to the same page. You can even send a message: Redirect Page On User Guide
  • Be careful with the namespaces.

If what you want to do once completed this stage is an integration since composer requires it would be sufficient or requires some kind of strategy.

Codeigniter 3 example has a situation set the autoload in composer config but also bounce error "LibraryX/SDK\method" error or similar, this would be re-eded to integrate libreries from composer.

I will make an effort, I have urgency to understand if I can solve a problem with Codeigniter 3, I also have doubts with the handling of sessions data, but if in documentation it is in order then I will review it.