![]() |
I've created a small command.
https://github.com/kenjis/ci4-composer-installer
That applet intentionally locks composer.json to the requested version. If you want to update it later you will need to modify composer.json and change the requirement back to an open-ended dependency (like `^4.1`)
(07-14-2022, 04:17 AM)MGatner Wrote: That applet intentionally locks composer.json to the requested version. If you want to update it later you will need to modify composer.json and change the requirement back to an open-ended dependency (like `^4.1`) Hi, Thank you for the feedback and help. This is what i did: (1) Create a new CI4 "ci4tst" using "php ci4-install.php ci4tst 4.1.9" - successful but failed on this lines: Code: cd ci4tst; composer require -W codeigniter4/framework:4.1.9 (2) ran the commands manually - successful (3) ran the php spark to test - successful, shows version 4.1.9 (4) Edited composer.json as: Code: "require": { (6) Ran "composer update". Generates the following messages: Code: Loading composer repositories with package information (7) Ran php spark - failed with the messages: Code: PHP Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\CLI\Console::__construct() must be an instance of CodeIgniter\CodeIgniter, int given, called in C:\xampp\htdocs\MyDevelop\ci4vanilla\ci4tst\spark on line 48 and defined in C:\xampp\htdocs\MyDevelop\ci4vanilla\ci4tst\vendor\codeigniter4\framework\system\CLI\Console.php:29 (07-14-2022, 05:17 AM)murugappan Wrote:(07-14-2022, 04:17 AM)MGatner Wrote: That applet intentionally locks composer.json to the requested version. If you want to update it later you will need to modify composer.json and change the requirement back to an open-ended dependency (like `^4.1`) (07-14-2022, 05:17 AM)murugappan Wrote: (1) Create a new CI4 "ci4tst" using "php ci4-install.php ci4tst 4.1.9" - successful but failed on this lines: I updated ci4-install.php. Can you check the error fixed?
(07-14-2022, 02:30 PM)kenjis Wrote:(07-14-2022, 05:17 AM)murugappan Wrote: (1) Create a new CI4 "ci4tst" using "php ci4-install.php ci4tst 4.1.9" - successful but failed on this lines: Hi @kenjis, The update works great. I tried composer update. It appears to go through but when i run php spark it fails. I guess once I create the app this way we cannot perform a composer update to the latest version.
@murugappan
The error "Uncaught TypeError: Argument 1 passed to CodeIgniter\CLI\Console::__construct() must be an instance of CodeIgniter\CodeIgniter, int given" is expected. Because of the breaking changes in index.php or spark. I added the explanation. See https://github.com/kenjis/ci4-composer-i...deigniter4
(07-14-2022, 03:06 PM)kenjis Wrote: @murugappan I tried the patch after installing tatter/patches. Unfortunately, this uses unix commands but I am on Windows. So i performed a Composer Update and then updated the index.php and spark as stated in the manual method for upgrade. Works fantastic. Thank you so much.
I added how to upgrade by another update tool Liaison Revision.
See https://github.com/kenjis/ci4-composer-i...n-revision Note: Patches and Liaison Revision are completely different tools. They work differently.
(07-14-2022, 04:26 PM)kenjis Wrote: I added how to upgrade by another update tool Liaison Revision. I understand that. Thank you so much. |
Welcome Guest, Not a member yet? Register Sign In |