0

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

asked Mar 10, 2021 at 14:30

3 Answers 3

1

Run

composer require magento/product-community-edition=2.4.2 --no-update --use-default-magento-values
answered Mar 10, 2021 at 14:42
4
  • Added the message in the post. Commented Mar 10, 2021 at 14:47
  • update "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", Commented Mar 10, 2021 at 14:52
  • Ran this command. It returns: Command 'update' not found, did you mean: Commented Mar 10, 2021 at 15:37
  • I meant edit composer.json and change the version for dealerdirect/phpcodesniffer-composer-installer to ^0.7.0 Commented Mar 10, 2021 at 15:56
1

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.

answered Mar 11, 2021 at 5:37
3
  • 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 luster Commented 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 restart Commented Mar 11, 2021 at 16:35
  • Yes, elasticsearch 7 was already installed with the previous upgrade itself. Commented Mar 13, 2021 at 7:05
1
answered Jun 9, 2022 at 3:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.