0

I’m trying to upgrade my Magento project from version 2.4.7-p1 to 2.4.8 using Composer, but I’m running into dependency issues.

Here’s what I’ve tried:

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

After running this, I get several version conflicts like:

Your requirements could not be resolved to an installable set of packages. - Root composer.json requires magento/product-community-edition 2.4.8, found 2.4.8, but the package requires PHP >=8.2 and <8.4 - laminas/laminas-code version conflict with symfony/dependency-injection 

My environment:

PHP 8.2 MySQL 8.0 Elasticsearch 8.13 Magento 2.4.7-p1 (Open Source) 

Questions:

  1. What’s the correct Composer command to upgrade to Magento 2.4.8 without breaking dependencies?

  2. Do I need to manually update PHP or other libraries (like laminas/* or symfony/*) first?

  3. Is there a recommended upgrade sequence for modules like magento/module-elasticsearch or magento/module-inventory?

2 Answers 2

1

I always use -W switch. It tells composer to load all dependencies.

You might have different PHP binaries installed so make sure you fire composer with the right PHP.

I also use composer2.

Here is what works for me:

php83 /usr/local/bin/composer2 require magento/product-community-edition=2.4.7-p8 -W 

Good luck!

1

First you need to update your system to fulfill magento 2.4.8 system requirements.

Here is the system requirement of magento 2.4.8.

Software dependencies For 2.4.8

Composer 2.8 OpenSearch 2 MariaDB 11.4 New Relic 11.5.0.18+,10.15.0.4+ PHP 8.4, 8.3 RabbitMQ 4.1 MySQL 8.4 

One's you ready with this system, then you can run this commands.

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

After that one, you need to run following commands.

php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento indexer:reindex php bin/magento cache:flush 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.