5

I'm upgrading Magento from 2.2.7 to 2.3.0 from composer. Running in sequence

php bin/magento maintenance:enable 
composer require magento/product-community-edition 2.3.0 --no-update 
composer update 

In the console I read several lines of error with sentences like

magento/framework 100.1.15 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6 -> your PHP version (7.1.23) does not satisfy that requirement.

Can only install one of: magento/framework[102.0.0, 101.0.0].

I'm using php v7.1.23 and https://magento.com/tech-resources/download don't say nothing about issue on v 7.1.x.

So i don't understand why the upgrade isn't compatible.

How does this problem happen? Do I need to upgrade to php v7.2?

2
  • Can you please check if one of your extensions requires magento/framework 100.1.* in its composer.json?
    – sv3n
    Commented Nov 30, 2018 at 16:11
  • In the error message there are lines like - modulo_x 1.0.0 requires magento/framework ~100.1.0|^101.0.0 -> satisfiable by magento/framework[101.0.7, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.4..] Commented Dec 3, 2018 at 7:38

6 Answers 6

5

To resolve I manually updated the packages that gave me error one by one. Every update I did rerun composer:update. In the end all the requirements were met and the update was successful. The PHP version was correct.


Now for the upgrade to version 2.3.2 I found the same problem. I found incompatible packages in composer.json and removed them. Then I discovered the existence of this parameter that was useful to me: composer require magento/product-community-edition 2.3.2 --update-with-all-dependencies.

1

I had the same issue with php version conflict. In my case, I had to uninstall and install the php as upgrading via command line still caused the issue. Hope that helps!

5
  • Which php version currently you're using? Commented Dec 6, 2018 at 6:18
  • Currently Using 2.2. Commented Feb 26, 2019 at 22:59
  • Not magento version, try php -v command line in terminal to check php version. Commented Feb 27, 2019 at 4:45
  • Yes, Currently using 7.1 Commented Feb 27, 2019 at 21:20
  • Can you please show me the screenshot of error? Commented Feb 28, 2019 at 5:18
0

i think you'll have to not pass the --no-update flag -- that tells composer to not update related packages.

magento/framework in m2.3 requires "php": "~7.1.3||~7.2.0" so that should resolve your issue.

1
  • If I remove --no-update this error show up: Can only install one of: temando/module-shipping-m2[1.4.6, 1.3.7]. Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0]. etc Commented Dec 3, 2018 at 7:53
0

Follow instructions as detailed in documentation https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html

0

the problem is usually composer and dependencies-specific, you just need to understand what Composer is telling you. Obviously, something in Magento need to be updated or "tweaked". Composer is telling you that some requirements are not met: it's not telling your php version is not supported by Magento framework, it's saying that due to some requirements (that you can find in extension-specific composer.json) your current php version can't be used. You are simply supposed to look into those extensions, update them first (their composer.json), then re run the update: you should find a hint in the error message that points to a specific extension.

Let's make a practical example: you've got extension "myext" composer.json requiring magento/framework<102.0.0 If you try to upgrade to Magento 2.3.2 it will fail because Magento 2.3.0 will need at least magento/framework=102.0.0 but your extension can't run with 102.0.0 (is set to require a <102.0.0).

Requirements can't be met and Your requirements could not be resolved to an installable set of packages. 

In the error message composer could also tell you that the extension will need a older php version to be able to run. So look broader in the composer error message: you'll find the extensions that need to be upgraded first.

To take the answer even to a broader possible set of composer-related errors: it's important to remember that even if you're updating to a magento version that supports newer php versions you're sometimes forced to use the older to perform the upgrade (this is the case when upgrading from 2.2.8 to 2.3.2 : you upgrade using 7.1 then only after you can switch to 7.2). MageDevdocs can be very useful here. Remembe that Composer is all about "Dependency Manager for PHP"

-2

I had the exact same problem. In my case part of the problem was that there are 2 Braintree extensions, one that is built in and is advanced. Gene writes both but the 2nd has Apple Pay included. The 2nd one is not compatible with 2.3.0 right now. I was able to get Magento 2.2.6 to 2.3.0 upgrade to work after a lot of trial and error. Here is the procedure I followed. 

Obviously backup everything first. I did it on a development copy first.

  1. Update all extensions
  2. run composer remove gene/module-braintree & composer remove paypal/module-braintree
  3. composer update
  4. composer require magento/module-braintree
  5. composer update
  6. Install Magento 2.2.7 (cannot go directly to 2.3.0)
  7. compile, deploy and clean caches - check it works
  8. Install Magento 2.3.0 by following these instructions, but DON'T run the composer update command. Make sure you remove the update folder and do that step, even though it says optional. https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html
  9. Edit the composer.json file in the root.Remove any 3rd party repositories. Also remove any extensions you don't need. I found Sendgrid and Bronto were not compatible with 2.3 and only had to remove those. You will know if you try run "composer update" if it gives you any errors.
  10. Run composer update
  11. Once Magento 2.3.0 is installed, I found that it would not run any bin/magento commands. This was fixed by flushing redis. May be different for your server but mine was. redis-cli -s /var/run/redis-multi-a751baae.redis/redis.sock -n 0 FLUSHDB
  12. compile, deploy and clear caches
  13. I use WeltPixel Pearl theme and had to update that now for the site to work properly again.

I found one other issue with swatches not displaying and followed the instructions here to fix https://github.com/magento/magento2/issues/19688 
 Good Luck!

1
  • Voted -1. This is not an answer on question above.
    – zhartaunik
    Commented May 21, 2019 at 6:53

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.