Magento 2.4.5 – Fix Community Upgrade Composer Error in Lock File

composer-updateerrorlinuxmagento-upgrademagento2

Thank you for taking time to read this.

  1. I have been trying to upgrade Magento 2.4.3 to 2.4.5 but getting these errors
    for example
  • Root composer.json requires extprovider/extname ^1.14, found extprovider/extname[1.14.1] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file

or its like this

  • Root composer.json requires extprovider/extname, it could not be found in any version, there may be a typo in the package name.

All the errors are for extensions from the same company installed via a private repo

I dont want to update these extensions just Magento

Also I dont have access to that private repo at the moment but I still require to use these extensions.

After running
composer require magento/product-community-edition 2.4.5 –no-update

then
composer update

when the error is happening.

I went ahead and removed from inside composer.json file the all references to those extensions and the private repo which allowed me to update to 2.4.5 –

However as I said I need the extensions so how can I upgrade and still keep the extensions

I read several post some saying to change composer I tried with
Composer version 2.2.8 2022-03-15 12:55:20
and
Composer version 2.2.18 2022-08-20 11:33:38

but this did not allow me to run the composer update command

  1. I changed the PHP from 7.4 to 8.1 before starting the upgrade.

I since then found some posts saying it needs to be done in the later steps before
rm -rf var/cache/* ; rm -rf var/page_cache/* ; rm -rf generated/code/* ; bin/magento setup:upgrade

can someone confirm the correct method

Best Answer

If you want to upgrade the Magento version only, it's an integrate process with composer you can follow but with third-party extensions:

please note the following:

The third-party extension will conflict with the latest version compatibility and the PHP version.

What you can do:

  • Disable all third-party extensions and upgrade versions.
  • Launch another application with the latest version and install plugins and another extension one by one.
  • Upgrade your third-party extension with your Magento version

Thnaks

Related Topic