1

I'm trying to upgrade Magento 2.4.0 to 2.4.5, i didn't upgrade PHP version, i'm using 7.4

composer require magento/product-community-edition 2.4.5 --no-update

I got this message

The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") 
that does not match your Composer installation ("2.3.0"). You may need to run composer update with 
the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") 
that does not match your Composer installation ("2.3.0"). 
You may need to run composer update with the "--no-plugins" option.

After

composer update --ignore-platform-reqs

Problem 1
- Root composer.json requires magento/product-community-edition 2.4.5 -> satisfiable by magento/product-community-edition[2.4.5].
- magento/product-community-edition 2.4.5 requires guzzlehttp/guzzle ^7.4.2 -> found guzzlehttp/guzzle[7.4.2, ..., 7.5.0] but itconflicts with your root composer.json require (^6.5).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Should i update composer.json manually?

2
  • Can you try to copy the composer.json content from 2.4.5 to 2.4.0 then run composer update Commented Sep 2, 2022 at 15:54
  • i have upgraded module composer composer require magento/composer-root-update-plugin ~2.0 --no-update then i found in doc "Adobe Commerce 2.4.2 introduced support for Composer 2. If you are attempting to upgrade from <2.4.1, you must first upgrade to a version that is compatible with Composer 2 (for example, 2.4.2) using Composer 1 before upgrading to Composer 2 for >2.4.2 upgrades" Commented Sep 2, 2022 at 17:40

7 Answers 7

2

To upgrade Magento 2.4.0 to 2.4.5, you first need to upgrade the PHP version to 8.1 to avoid conflict and dependency issues.

What you can do is:

  • Enable the maintenance mode: php bin/magento maintenance:enable

  • Back up your application and composer:

    cp composer.json composer.json.bak

Note: It is better to perform on the development store.

  • Upgrade the composer version to 2 latest version, Since Adobe Commerce requires to be in latest version of composer. Run the command: composer require-commerce magento/<product> <version> --no-update [--interactive-root-conflicts] [--force-root-updates] [--help]

  • Upgrade and install: composer require-commerce magento/product-community-edition 2.4.5 --no-update

  • Run composer update

  • Run setup upgrade to upgrade database and compile

  • Disable maintenance mode.

For Full details please check: https://www.cloudways.com/blog/magento-2-4-upgrade/

https://experienceleague.adobe.com/docs/commerce-operations/upgrade-guide/implementation/perform-upgrade.html

0

You need update you PHP version 7.4 to 8.1.

After you updated php version you can check below link steps.

Upgrade Magento 2.3.3 to 2.4

Also you check below link for you issue related solutions.

https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Can-t-upgrade-to-Magento-2-4-3-Composer-complains-about-allure/td-p/481157

THANKS

0

In such cases, I usually recreate composer.json from scratch and it always helps.

For this, you need to download the 2.4.5 clean version and use PHP Storm tool to start comparing to files side by side.

some People manually change composer json and it affects auto update.. So that will help you to resolve a such issue in the feature in 30 min

0

Please Try below steps for update existing project First you need to check magento system requirements as per the version which link is given below and update first if required Like :- (php, composer, mysql, elastic search) version etc then start work on it.

You can upgrade magento version using command line follow below steps

  1. First Enable maintenance mode using a command.
    php bin/magento maintenance:enable

  2. Take backup of you composer.json file using command.
    cp composer.json composer.json.bk

  3. Update composer.json file
    composer require-commerce magento/product-community-edition 2.4.5 --no-update

  4. Composer update
    composer update

  5. Please run below commands one by one.
    php bin/magento cache:clean
    rm -rf var/cache/*
    rm -rf var/page_cache/*
    rm -rf generated/code/*
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f

  6. Disable Maintainance Mode.
    php bin/magento maintenance:disable

0

Please follow these steps

Step 1. Download ver:2.4.5 composer.json by following command in other temp directory.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.5 .

Step 2. Take backup current composer.json and composer.lock files

Step 3. Upload the composer.json from temp directory to your project directory

Step 4. Run composer update command

Step 5. Run setup upgrade and deploy commands

Step 6. Now install other require modules

0

I was updating my website from v 2.4.3 to v 2.4.3-p3 today with successfully, my steps as given below:

1. Enable Maintenace mode if you are running a live site:

bin/magento maintenance: enable

2. Upgrade composer to the latest version, my previous is 1.0

sudo composer self-update --2

3. Make a backup for composer.json

cp composer.json composer.json.bak

4. Make a backup for composer.lock

cp composer.lock composer.lock.bak

5. If you are upgrading from Magento Open Source to Adobe Commerce, remove the Magento Open Source package.

composer remove magento/product-community-edition --no-update

6.Please modify the code to correct the version number you need to upgrade

composer require magento/product-community-edition=2.4.3-p3 --no-update

7. Keep working run this comment

composer update

8. Final steps

rm -rf var/cache/*

rm -rf var/page_cache/*

rm -rf generated/code/*

bin/magento setup:upgrade

bin/magento maintenance:disable 

Please update again. If there is any abnormality in the upgrade process, make sure that the current network is directly connected Server, and there is no third-party support!

Also, you can check Magento 2 folder permission.

sudo find . -type f -exec chmod 664 {} \;

sudo find . -type d -exec chmod 775 {} \;

sudo find var pub/static pub/media app/etc -type f -exec chmod g+w {} \;

sudo find var pub/static pub/media app/etc -type d -exec chmod g+ws {} \;

sudo chmod u+x bin/magento

Refer to: Magento 2 folder/file permissions

0

It looks like you are running into some dependency issues when trying to upgrade Magento 2.4.0 to 2.4.5 without upgrading PHP.

Here's how you can try to upgrade to 2.4.0 to 2.4.5:

  1. Upgrade to PHP version. Magento 2.4.5 requires at least PHP 7.4.25, so this would be the recommended approach. You would need to make sure your extensions and code are compatible before upgrading PHP.

  2. Manually update your root composer.json file to require Guzzle ^7.4. This will allow the upgrade to proceed but could potentially cause issues if you have other dependencies relying on Guzzle 6.x.

  3. Use the --with-all-dependencies (-W) flag to force Composer to allow the upgrade. This may cause unnecessary upgrades/downgrades of other packages though.

Overall, I would recommend upgrading your PHP version if possible. If not, be very careful in managing your dependencies and test everything thoroughly if forcing the upgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.