![]() |
Moving to ci4 - 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 to ci4 (/showthread.php?tid=87908) |
Moving to ci4 - richb201 - 06-17-2023 It has been a number of years but I am ready to move my app from ci3 to ci4. I realize this will be a rewrite. But first I need to learn ci4. Can anyone recommend a way to learn CI4? Is reading the documentation the way to go? RE: Moving to ci4 - iRedds - 06-17-2023 1. learn php (namespace priority) 2. documentation 3. source code RE: Moving to ci4 - richb201 - 06-17-2023 Thx. Can you point at an example? I already know php slightly. What is namespace priority? Where can I review that? What documentation are you referring to? RE: Moving to ci4 - iRedds - 06-17-2023 https://www.php.net/manual/en/language.namespaces.rationale.php RE: Moving to ci4 - kenjis - 06-17-2023 Yes, first of all, everyone should learn modern PHP, especially namespaces and autoloading (PSR-4). https://phptherightway.com/#namespaces https://leanpub.com/codeigniter4foundations "Primer: Namespaces" https://www.php-fig.org/psr/psr-4/ And it is better to learn Composer. https://phptherightway.com/#composer_and_packagist Next read the upgrade guide. https://codeigniter4.github.io/CodeIgniter4/installation/upgrade_4xx.html "CodeIgniter 3 to 4 Upgrade Helper" might help you. https://github.com/kenjis/ci3-to-4-upgrade-helper#readme RE: Moving to ci4 - InsiteFX - 06-17-2023 Read the CodeIgniter Documentation also. IncludeBeer - CodeIgniter 4 Tutorials. Search Google for other Tutorials. RE: Moving to ci4 - richb201 - 06-20-2023 Thanks. With some help I managed to get ci4 and a debugger running under phpstorm. I am going to try to roughly get my ci3 app running under ci4. My app uses GroceryCrud heavily. My main controller called Configure.php starts with __construct() where I load up a few helpers and libraries, get the results of authentication from Okta, run _init() which set up session variables and finally index(). My question is where do I do the initialization/sessionSetup/authetication now? Do I do this in the BaseController? (06-20-2023, 03:20 PM)richb201 Wrote: Thanks. With some help I managed to get ci4 and a debugger running under phpstorm. I am going to try to roughly get my ci3 app running under ci4. My app uses GroceryCrud heavily. RE: Moving to ci4 - InsiteFX - 06-20-2023 Yes the BaseController is where I setup my Sessions. PHP Code: <?php RE: Moving to ci4 - richb201 - 06-21-2023 Thanks Insite. It has been awhile. I am trying to setup BaseController. I am on the helpers section: protected $helpers = []; So I tried this: helper(array('form', 'url', 'file', 'array', 'download', 'directory', 'cookie','date')); I want to get started on the "right foot". Docs show: helper('array'); Is that not what I am doing? RE: Moving to ci4 - kenjis - 06-21-2023 See https://codeigniter4.github.io/CodeIgniter4/general/helpers.html |