Fix Library: Upgrades and compatibility
Composer Conflicts During a Magento Upgrade
Last updated:
What you see
The upgrade stops with "Your requirements could not be resolved to an installable set of packages".
Quick answer
Composer is telling you that one package needs a version of something that another package does not allow. Ask composer which package blocks the target version, update or remove that package, and use Adobe's root update plugin to bring the root composer.json in line with the new release.
What usually causes it?
- An extension that requires an older Magento or PHP version
- Root composer.json requirements left over from the old version
- A platform PHP version set in composer config that is too old
- Missing or expired repo.magento.com keys in auth.json
How do you check it safely?
These checks only read information. Run them on staging first if you can, from the Magento root folder as the file system owner. Hosting setups differ, so paths and service names may need adjusting.
- Ask composer what blocks the target version.
composer why-not magento/product-community-edition 2.4.9 - Check the PHP version composer assumes.
composer config platform.php php -v - List outdated direct dependencies.
composer outdated --direct
How do you fix it?
These steps change your store. Run them on staging first, with a backup of code and database.
- Install Adobe's root update plugin and let it update the root requirements, without installing yet.
composer require magento/composer-root-update-plugin ~2.0 --no-update composer require-commerce magento/product-community-edition 2.4.9 --no-update - Update or remove each blocking extension found by why-not, then run the update.
composer update --with-all-dependencies - Set the platform PHP version to the version your server will run, if it is set at all.
composer config platform.php 8.5 - Commit composer.json and composer.lock together once the update works on staging.
When should you call an expert?
Call an expert if several extensions block the upgrade, or a vendor no longer supports a module your store depends on.
Need it fixed today?
I can look at it with you. Book a 20 minute call, or if the store is down, see emergency Magento support.
FAQ
Common questions.
Should I delete composer.lock to make it work?
No. That updates everything at once and hides what changed. Fix the blocking package and keep the lock file in Git.
Is the package name the same for Adobe Commerce?
No. Adobe Commerce uses magento/product-enterprise-edition. Use the edition your store runs in the commands.
Related
Rather have it fixed for you?
Send a few lines about the problem, or book a 20 minute call. You get an honest read and a fixed quote.