Welcome Guest, Not a member yet? Register   Sign In
How do I update from 4.4.4 to 4.5.5?
#1

I tried following the instructions here:
https://codeigniter.com/user_guide/insta...-upgrading
and added this to my root composer.json: "codeigniter4/framework": "4.5.5" (under require)
but I get the error: 
Root package 'codeigniter4/framework' cannot require itself in its composer.json 
Did you accidentally name your root package after an external package?

How do I upgrade correctly?
Reply
#2

(This post was last modified: 10-10-2024, 09:20 PM by InsiteFX.)

You need to start with your version and incrementally upgrade using the Change Logs.

I looked, and yes you will also need to upgrade files in the app folders also.

Just do it step by step and upgrade each version.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Read and follow the instructions.
Upgrading from 4.5.4 to 4.5.5
Upgrading from 4.5.3 to 4.5.4
Upgrading from 4.5.2 to 4.5.3
Upgrading from 4.5.1 to 4.5.2
Upgrading from 4.5.0 to 4.5.1
Upgrading from 4.4.8 to 4.5.0
Upgrading from 4.4.7 to 4.4.8
Upgrading from 4.4.6 to 4.4.7
Upgrading from 4.4.5 to 4.4.6
Upgrading from 4.4.4 to 4.4.5
https://codeigniter.com/user_guide/insta...ading.html
Reply
#4

(This post was last modified: 10-10-2024, 04:50 AM by captain-sensible. Edit Reason: more more )

can you post your composer.json file please this is mine:

Code:
{
    "name": "codeigniter4/appstarter",
    "description": "CodeIgniter4 starter app",
    "license": "MIT",
    "type": "project",
    "homepage": "https://codeigniter.com",
    "support": {
        "forum": "https://forum.codeigniter.com/",
        "source": "https://github.com/codeigniter4/CodeIgniter4",
        "slack": "https://codeigniterchat.slack.com"
    },
    "require": {
        "php": "^8.1",
        "codeigniter4/framework": "4.5.5",
         "phpmailer/phpmailer": "^6.8"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9",
        "mikey179/vfsstream": "^1.6",
        "phpunit/phpunit": "^10.5.16"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Config\\": "app/Config/"
        },
        "exclude-from-classmap": [
            "**/Database/Migrations/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\Support\\": "tests/_support"
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "scripts": {
        "test": "phpunit"
    }
}



so you edit this line :
Code:
"codeigniter4/framework": "4.5.5",
and change it incremently , so yours would be :
Code:
"codeigniter4/framework": "4.4.5",

then run from a cli run composer
command and output from mine :

Code:
[andrew@darkstar CI4-CMS]$ composer upgrade
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading phpmailer/phpmailer (v6.9.1 => v6.9.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downloading phpmailer/phpmailer (v6.9.2)
  - Upgrading phpmailer/phpmailer (v6.9.1 => v6.9.2): Extracting archive
Generating optimized autoload files
27 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply
#5

Did you ever find a solution to this issue?  I'm having the exact same issue.  Everything upgrades successfully to 4.5.3.  But as soon as I try to upgrade to 4.5.4, its like the following doesn't belong in composer.json anymore...

   
Code:
"require": {
        "php": "^8.1",
        "codeigniter4/framework": "4.5.3",
        "ext-intl": "*",
        "ext-mbstring": "*",
        "laminas/laminas-escaper": "^2.13",
        "psr/log": "^3.0",
        "ramsey/uuid": "^4.1",
        "sonata-project/google-authenticator": "^2.3",
        "slim/slim": "3.*"
    },


I have it in the "require" section.  Just like https://codeigniter.com/user_guide/insta...-upgrading indicates it should be.  But when I do that I get the following errors:

-----------------------------------------------
$ composer update

In RootPackageLoader.php line 150:
                                                                                   
  Root package 'codeigniter4/framework' cannot require itself in its composer.json 
  Did you accidentally name your root package after an external package?           
                                                                                   

update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]
Reply
#6

@opiecomp It seems your composer.json is broken.
If you show all the content of the file, someone may help you.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB