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

1

Run

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

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.

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 – CodeForGood Mar 11 at 13:27
  • have you installed elasticsearch already? Its required for Magento 2.4.*. If installed, then make sure its running. service elasticsearch restart – Abdul Samad Abbasi Mar 11 at 16:35
  • Yes, elasticsearch 7 was already installed with the previous upgrade itself. – CodeForGood Mar 13 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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