0

I'm trying to update Magento from 2.3.0 to 2.4 using the setup Wizard.

In the Readiness Check, I'm getting the following error:

**Check Component Dependency We found conflicting component dependencies.

Command "require" failed: Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/

In InitCommand.php line 697:

Package magento/product-community-edition at version 2.4.3 has a PHP requir ement incompatible with your PHP version (7.2.34)

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [...]**

I can't find out how to fix this error. I have tried changing the php from 7.2 to 7.3 or 7.4 but when I do, I get more errors in the Readiness Check.

Also, I tried using the composer self-update I get the folowing warning:

The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option. 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.0.0"). You may need to run composer update with the "--no-plugins" option.

I'm using: Magento v2.30 PHP v7.2 Composer v2.1.6

Any idea what the problem is and how I can fix it? Thank you in advance.

asked Sep 20, 2021 at 12:28

2 Answers 2

0

Magento isn't yet ready for Composer 2, so you need to downgrade composer to 1.x: sudo composer self-update --1 and try running the update via the CLI again. Then you can use PHP 7.4 (or 7.3).

answered Sep 20, 2021 at 12:45
2
  • Hello @Brett, thank you for your help. I downgraded the composer to v1.10.22. What do you mean "try running the update via the CLI again'? Should I update the composer or update magento via CLI? Commented Sep 20, 2021 at 13:03
  • I mean on the command line, after downgrading to composer v1, run the update/upgrade process again. Commented Sep 20, 2021 at 19:03
0

Install elasticsearch first

Take a backup of your both Magento files and database

Enable maintenance mode

bin/magento maintenance:enable
composer require magento/composer-root-update-plugin=~1.0 --no-update
composer update

backup composer.json

cp composer.json composer.json.bak

remove magento product edition

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

require product edition with 2.4.0

composer require magento/product-community-edition=2.4.0 --no-update

Update using composer

composer update
rm -rf generated/code/* var/view_preprocessed/* var/cache/* var/page_cache/* && php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento s:s:d -f && php bin/magento c:c && chmod -R 777 var/ pub/ generated/

Disable the maintenance mode

bin/magento maintenance:disable

Reference: https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html

answered Sep 20, 2021 at 13:27
2
  • Hi, I tried it but din't work. When I ran the composer update command, I got these warnings/errors: "The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.1.0"). You may need to run composer update with the "--no-plugins" option. Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages." Commented Sep 20, 2021 at 13:55
  • please downgrade composer version by running this command composer self-update --1 Then try again! Commented Sep 20, 2021 at 14:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.