I'm trying to upgrade to Magento 2.4.2, and looking for a fix to the following message that appeared. Please suggest what I should have done to prevent it.
equire magento/product-community-edition=2.4.2 --no-update
Warning from https://repo.packagist.org: You are using an outdated version of Co mposer. Composer 2 is now available and you should upgrade. See https://getcompo ser.org/2
Magento Open Source 2.4.2 is trying to change the existing order of the require section.
Local order:
[
magento/composer-root-update-plugin,
magento/product-community-edition
]
Magento Open Source 2.4.2 order:
[
magento/product-community-edition,
magento/composer-root-update-plugin
] but it will not be changed. Re-run using --use-default-magento-values or -- interactive-magento-conflicts to override with the Magento order.
Magento Open Source 2.4.2 is trying to update require-dev:dealerdirect/phpcodesn iffer-composer-installer to ^0.7.0 from ^0.5.0 in Magento Open Source 2.4.1 but the field has been removed in this installation and will not be changed. Re-run using --use-default-magento-values or --interactive-magento-conflicts to overri de with Magento values.
Updating composer.json for Magento Open Source 2.4.2 ...
./composer.json has been updated
Message below displayed on running the command composer require magento/product-community-edition=2.4.2 --no-update --use-default-magento-values
Magento Open Source 2.4.2 is trying to change the existing order of the require section. Local order: [ magento/composer-root-update-plugin, magento/product-community-edition ] Magento Open Source 2.4.2 order: [ magento/product-community-edition, magento/composer-root-update-plugin ] Overriding local order due to --use-default-magento-values. Magento Open Source 2.4.2 is trying to update require-dev:dealerdirect/phpcodesn iffer-composer-installer to ^0.7.0 from ^0.5.0 in Magento Open Source 2.4.1 but the field has been removed in this installation Overriding local changes due to --use-default-magento-values. Updating composer.json for Magento Open Source 2.4.2 ... ./composer.json has been updated
3 Answers 3
Run
composer require magento/product-community-edition=2.4.2 --no-update --use-default-magento-values
-
Added the message in the post.CodeForGood– CodeForGood2021年03月10日 14:47:26 +00:00Commented Mar 10, 2021 at 14:47
-
update "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",paj– paj2021年03月10日 14:52:08 +00:00Commented Mar 10, 2021 at 14:52
-
Ran this command. It returns: Command 'update' not found, did you mean:CodeForGood– CodeForGood2021年03月10日 15:37:31 +00:00Commented Mar 10, 2021 at 15:37
-
I meant edit composer.json and change the version for dealerdirect/phpcodesniffer-composer-installer to ^0.7.0paj– paj2021年03月10日 15:56:49 +00:00Commented Mar 10, 2021 at 15:56
I had similar issue, fixed this way:
composer require magento/product-community-edition=2.4.2 --no-update --use-default-magento-values then composer upgrade and finally again composer require magento/product-community-edition=2.4.2 --no-update --interactive-magento-conflicts. There would be some prompt for you after this command, handle that and hopefully you're good to go.
-
It seems to have worked. When running the upgrade command, I found this error
Could not validate a connection to Elasticsearch. No alive nodes found in your c lusterCodeForGood– CodeForGood2021年03月11日 13:27:57 +00:00Commented Mar 11, 2021 at 13:27 -
have you installed elasticsearch already? Its required for Magento 2.4.*. If installed, then make sure its running.
service elasticsearch restartAbdul Samad Abbasi– Abdul Samad Abbasi2021年03月11日 16:35:30 +00:00Commented Mar 11, 2021 at 16:35 -
Yes, elasticsearch 7 was already installed with the previous upgrade itself.CodeForGood– CodeForGood2021年03月13日 07:05:17 +00:00Commented Mar 13, 2021 at 7:05
Refer to magento/composer-root-update-plugin