0

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

2 Answers 2

0

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

7
  • The problem is when you disable third party extensions the settings configurations are all deleted when you upgrade - if you remove the extensions from composer.json again they are deleted including the database tables.
    – nem3943
    Nov 29, 2022 at 11:21
  • Hi @nem3943, that means your third-party extensions have some code that conflicts with the settings configurations to delete, so you need to first fix this as it can cause further problems after upgradation also. Nov 29, 2022 at 11:36
  • there is no error or conflict with the extensions - please try and check the post in more detail to understand the dilemma
    – nem3943
    Nov 29, 2022 at 12:03
  • I checked but you mention above by disable third party extensions the settings configurations are all deleted when you upgrade what did you do on this? Nov 29, 2022 at 12:09
  • in magento if you disable extension and run upgrade command database tables get removed for those extensions
    – nem3943
    Nov 29, 2022 at 12:59
0

This issue can only be fixed by

  1. creating a new private repository - uploading all extension files to there. Otherwise you will get extension found in lock file but not in remote server error when running composer update.

  2. After creating the new private repo - change inside composer.lock file all the extensions url from old to new url

  3. remove old repo and add new repo details inside auth.json

  4. check inside composer.json file the extensions versions are exactly same as the ones you have uploaded to the new private repo otherwise you will get errors or not found in remote server message. if its extension v1.2.33 in your extension file in composer.json it might be 1.2.3 it wont work until you change each version of each extension to match the ones on the new server.

  5. Run composer update as normal and complete upgrade

If you remove the extensions from require section in composer.json - they will be removed when running composer update command. If you change anything inside composer.lock file again you will face errors - this is the only way to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.