0

I am trying to upgrade Magento 2.4.1 to 2.4.6

PHP version  7.4
Composer version 2.6.5 

Below steps I have followed to upgrade

1- cp composer.json composer.json.bak

2- composer require magento/composer-root-update-plugin=~2.0 --no-update

3- composer require magento/product-community-edition=2.4.5 --no-update

4- copied contents of "require-dev" from https://github.com/magento/magento2/blob/2.4.6-p3/composer.json and placed in my root composer.json file

5- Changed PHP version to 8.2

6- composer update While running this command there were below prompts which I set y

7- Do you trust "magento/composer-root-update-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

8- Do you trust "magento/composer-dependency-version-audit-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

9- Do you trust "magento/inventory-composer-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

These all steps went smoothly without any errors.

But the weird thing is many files are missing like Magento and .htaccess files in the bin folder

also in app/etc and bootstrap.php also missing

HOwever before doing all above steps site is running properly and all files ere available.

How to fix these?

3
  • Please check the system requirements : experienceleague.adobe.com/docs/commerce-operations/…
    – Msquare
    Nov 23, 2023 at 11:37
  • Your Composer version is higher than the requirement.
    – Msquare
    Nov 23, 2023 at 11:37
  • did you get the error like There is an error in /app/vendor/magento/module-admin-adobe-ims/Model/GetAccessTokenProxy.php at line: 17 Interface "Magento\AdobeImsApi\Api\GetAccessTokenInterface" not found#0 /app/vendor/composer/ClassLoader.php(571): include() #1 /app/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/app/vendor/com...') #2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Magento\\AdminAd...')
    – sudo55
    Feb 12 at 15:41

1 Answer 1

1

Please remove your old vendor folder

rm -rf vendor/

Then, add the proper Composer version as per the document, which is 2.2.x. I used 2.2.18, which works well in our system. After that, please run the Composer commands.

System Requirements : https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html

composer require-commerce magento/product-community-edition 2.4.6-p3  --no-update --verbose
composer update

Reference Link: https://github.com/magento/composer-root-update-plugin/tree/develop/src/Magento/ComposerRootUpdatePlugin#usage

1
  • The main issue was composer version 2.4.6. I thought Magento 2.4.6 support minimum composer version 2.2.x and any latest version but this was not the case so i degraded to 2.2.x and issue solved.
    – ishaq
    Nov 24, 2023 at 17:19

Your Answer

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

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