magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.39k stars 9.29k forks source link

Composer showing error during version upgrade from 2.3.6-p1 to 2.4.7-p1 #38853

Open Haidersajid opened 3 weeks ago

Haidersajid commented 3 weeks ago

Summary

while upgrading Magento, I updated all plugin versions to be compatible with the new version and PHP 8.3. I also removed unnecessary plugins and added some from the 2.4.7-p1 composer as well.

While running the following command:

composer2 update

or

composer2 update --no-plugins --with-all-dependencies

Showing Error:

Note: tha magento/magento2ce its name specified at the beginning of the composer.json file, not as a plugin.

"name": "magento/magento2ce",

Also there is no "magento/magento2-base" in composer but its showing in command problem

Examples

00

Proposed solution

I tried upgrading Magento to version 2.4.2 and encountered the same problem

Release note

No response

Triage and priority

m2-assistant[bot] commented 3 weeks ago

Hi @Haidersajid. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

hostep commented 3 weeks ago

Just some notes:

Haidersajid commented 3 weeks ago

Just some notes:

  • ~magento/magento2ce doesn't exist, try to figure out where that comes from and remove it~ sorry I misunderstood, this is just the name of your own project, that's fine, then it's not important
  • magento/magento2-base does exists, it's a dependency of magento/product-community-edition
  • It might be best to create an empty directory to setup a clean composer.json file from a new Magento install, if you use the following command, it should generate a clean composer.json file that you can use to compare with your own, to try to figure out the problem in your own composer.json file:
composer create-project --no-install --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.7-p1 ./some-empty-directory

i have 2..4.7-p1 files in my pc already, I checked the compressor file more than once and compared it, but I was unable to solve the problem. Can I simply replace the compressor with a new one, 2.4.7-p1, and only change the name and version?

m2-assistant[bot] commented 3 weeks ago

Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:


hostep commented 3 weeks ago

Can I simply replace the compressor with a new one, 2.4.7-p1, and only change the name and version?

That's up to you to decide, you'll probably have to take over all the modules - if any - you installed extra from your old composer.json file...