简体   繁体   中英

Update Magento2 version 2.4.2 to 2.4.3 problem

i am trying to update Magento with the following steps

  1. composer require magento/product-enterprise-edition=2.4.3 --no-update on composer.json archive.
  2. run composer update

And i have these problems

Problem 1

- magento/project-enterprise-edition is present at version 2.4.2 and cannot be modified by Composer

- magento/product-enterprise-edition 2.4.3 requires vertexinc/product-magento-module-commerce 4.2.1 -> satisfiable by vertexinc/product-magento-module-commerce[4.2.1].

- vertexinc/product-magento-module-commerce[4.2.1] cannot be installed as that would require removing magento/project-enterprise-edition[2.4.2]. They both replace vertex/product-magento-module-commerce and thus cannot coexist.

- Root composer.json requires magento/product-enterprise-edition 2.4.3 -> satisfiable by magento/product-enterprise-edition[2.4.3].

Any idea how to solve this problem?

Thanks!

On first glance I'd say that while you do the composer require --no-update [--] magento/product-enterprise-edition=2.4.3 explicitly not doing any updates, the original Magento Enterprise Edition is kept locked to version 2.4.2.

Then running composer update is not updating it, resulting into the foremost problem reported (it looks leading to me, that all other problems are caused by it):

magento/project-enterprise-edition is present at version 2.4.2 and cannot be modified by Composer

It is my own understanding that the reason it cannot be modified by Composer is because magento/project-enterprise-edition is locked to 2.4.2 .

Try running:

composer update magento/project-enterprise-edition

to update that package explicitly.

(I can't say - as you did not share in your question - why you did run the composer require with --no-update , it is just that with --no-update the lock file is not updated and it seems that it is in use and further on pinning magento/project-enterprise-edition to [previous!] version 2.4.2 - you want to update to 2.4.3 [!]).

Additionally, running

  • composer update --with-dependencies magento/project-enterprise-edition or
  • composer update --with-all-dependencies magento/project-enterprise-edition

may be useful to escalate follow-up issues to make the dependency update command more binding. Excerpt from composer update --help (Composer version 2.1.11 2021-11-02 12:10:2) :

  • -w , --update-with-dependencies : Allows inherited dependencies to be updated, except those that are root requirements.
  • -W , --update-with-all-dependencies : Allows all inherited dependencies to be updated, including those that are root requirements.

Root requirements are those in your composer.{json,lock} file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM