cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Composer Version Error, While upgrade Magento 2.3.4 to 2.4.6

Getting Composer Version Error, While upgrade Magento 2.3.4 to 2.4.6

I was trying to upgrade Magento from ver. 2.3.4 to ver. 2.4.6

I have followed the below steps, mentioned below as step by step:

 

1- Enabled the Maintenance Mode: By using Terminal, i go in to the bin path and run the command

 

php magento maintenance:enable

 

which makes it enable and Terminal Shows the message: 

Enabled maintenance mode

 

 

2- Run Upgrade Magento 2.4.6: Then i run the below command to run the upgrade from Terminal,

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

 

 

But it Gives a below Error:

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

The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.6.0"). You may need to run composer update with the "--no-plugins" option.

along with following success message aswell

./composer.json has been updated

 

 

So to match the Composer Version i have Downgraded the composer as below:

 

[root@36]# composer self-update --1 --no-plugins

 

which shows me following success message

Warning: You forced the install of 1.10.27 via --1, but 2.7.1 is the latest stable version. Updating to it via composer self-update --stable is recommended.
Upgrading to version 1.10.27 (1.x channel).

Use composer self-update --rollback to return to version 2.7.1

 

then i retry to upgrade Magento 2.3.4 to 2.4.6 again as below:

 

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

 

 

But now i am getting a below Error to upgrade composer to 2

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/
./composer.json has been updated

 

Please help what i am doing wrong??

3 REPLIES 3

Re: Getting Composer Version Error, While upgrade Magento 2.3.4 to 2.4.6

Facing the same, any one can help?

Re: Getting Composer Version Error, While upgrade Magento 2.3.4 to 2.4.6

Hello @sirajulmoja02d 

 

Here are the steps to upgrade Magento from version 2.3.4 to 2.4.6:

Install php 8.1 / 8.2

Install Elasticsearch 7 (Version: 7.17.21)

Run bellow commands using terminal:

 

php bin/magento maintenance:enable
cp composer.json composer.json.bak
composer remove magento/product-community-edition --no-update
composer require magento/composer-root-update-plugin ~2.0 --no-update
composer require magento/product-community-edition=2.4.6-p3 --no-update
composer update

 

If found any issue regarding composer then run below commands:

 

cp composer.json composer.json.bak
composer remove magento/product-community-edition --no-update
composer require magento/composer-root-update-plugin ~2.0 --no-update
composer require magento/product-community-edition=2.4.6 --no-update
open composer.json and replace content of "require-dev"
        "require-dev": {
            "allure-framework/allure-phpunit": "^2",
            "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
            "dg/bypass-finals": "^1.4",
            "friendsofphp/php-cs-fixer": "^3.8",
            "lusitanian/oauth": "^0.8",
            "magento/magento-coding-standard": "*",
            "magento/magento2-functional-testing-framework": "^4.2.1",
            "pdepend/pdepend": "^2.10",
            "phpmd/phpmd": "^2.12",
            "phpstan/phpstan": "^1.9",
            "phpunit/phpunit": "^9.5",
            "sebastian/phpcpd": "^6.0",
            "symfony/finder": "^5.4"
        },
 composer update

 

 

Run below command for set elasticsearch settings:

php bin/magento config:set catalog/search/engine elasticsearch7
php bin/magento config:set catalog/search/elasticsearch7_server_hostname localhost
php bin/magento config:set catalog/search/elasticsearch7_server_port 9200
php bin/magento config:set catalog/search/elasticsearch7_enable_auth 0
php bin/magento config:set catalog/search/elasticsearch7_server_timeout 15

Run magento commands:

php bin/magento s:up
php bin/magento s:d:c
php bin/magento s:s:d -f
php bin/magento c:f

Hope it helps !

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9

Re: Getting Composer Version Error, While upgrade Magento 2.3.4 to 2.4.6

@sirajulmoja02d 

Hey,

Copy the contents from require-dev section and paste into your root composer.json file the run the composer update --ignore-platform-reqs command it will run. make sure your composer version is as per system requirement from Adobe and also php version is same. https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.h...

Or share your composer.json file.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.