How to upgrade CodeIgniter from version 4.1.3 to 4.1.4 |
I'm trying to update my CodeIgniter from version 4.1.3 to 4.1.4.
I need to update step by step for each version. I tried with composer update command, but only libraries are being updated. The framework is not updated.
that ones mostly cosmetic i think https://codeigniter.com/user_guide/insta...e_414.html
what version does the debug bar show ?
@captain-sensible , thanks for the reply.
Debug bar shows 4.1.3 My question is if there is a composer update command that updates the framework. Or to update the framework is just overwriting the system folder?
Check the framework version in your composer.json.
Code: "require": {
If there is a updated version you can install in your environment,
`composer update` update the framework package. If you don't fix the framework version in your composer.json, `composer update` should update to v4.1.5 at least. Because 4.1.5 is the last version in 4.1.x. But 4.1 is very old and there are some vulnerabilities. See https://github.com/codeigniter4/CodeIgni...advisories I recommend to update to 4.2.11.
12-31-2022, 03:54 AM
(This post was last modified: 12-31-2022, 03:55 AM by captain-sensible. Edit Reason: typo )
I agree with Kenjis but if you wanted to upgrade in stages, so to take into account the consequence of upgrading in small chunks , checking and taking things slowly. Then you can manually go from release to release .
So you should have at your web root a composer.json file if you installed using as per docs . It will look something like this: Code: "require": { Basically if you ran the command Code: composer create-project codeigniter4/appstarter --no-dev the caret before the 4.0 in the line "codeigniter4/framework": "^4.0" would make your system upgrade to the next latest release if you run : Code: composer update in your case if you edited in composer.json the line containing codeigniter4/framework to somethinglike Code: "codeigniter4/framework": "4.1.4", then run Code: composer update your debug bar should then show 4.1.4 you read the docs check files say at /vendor/codeigniter4/framework/public/index.php with files you have webroot/public/index.php make sure your happy then you go then re-edit the composer.json to Code: "codeigniter4/framework": "4.1.5", Laborious i agree , but hey I come from Slackware Linux ...you would at least be able to take things in small chunks
In my composer.json I dont have specified "codeigniter4/framework": "^4.0".
I will try in a test enviroment. Thanks a lot for the help!
Ok guys,
Without adding "codeigniter4/framework": "4.1.4", in composer.json there only updade the packages and not update codeigniter framework. If I add "codeigniter4/framework": "4.1.4", in composer.json and try to update I received this message: ![]()
01-06-2023, 10:21 AM
(This post was last modified: 01-06-2023, 10:49 AM by captain-sensible. Edit Reason: additional tex )
That might explain why its not updating framework using composer; also it implies you didn't set up codeigniter in xampp with composer either ?
have you got a "tree" command with windows to show directory structure ? I'm guessing you have a system directory ,at the same level as the app directory? if i was on linux in your position , i think (maybe) get https://github.com/codeigniter4/CodeIgni...tag/v4.1.3 replace system directory , then create patches from my codebase of existing files in app, public , writable with the new equivalent files from 4.1.3 download, in the directories app, public, writable so as to retain your old code, but have it in updated file , if that makes sense i.e basically a manual upgrade (01-06-2023, 10:21 AM)captain-sensible Wrote: That might explain why its not updating framework using composer; also it implies you didn't set up codeigniter in xampp with composer either ? You are right, the framework was not installed by composer. I installed it by unzipping the zip downloaded from the website. (01-06-2023, 10:21 AM)captain-sensible Wrote: i.e basically a manual upgradeThat's what I thought, I'll have to manually update version by version. |
Welcome Guest, Not a member yet? Register Sign In |