How do I upgrade Magento 2 EE using composer
-
07-01-2021 - |
Question
I am trying to upgrade Magento 2 EE using composer but I keep getting this message whenever I run composer update/upgarde
- The requested package magento/product-enterprise-edition 2.2.3 exists as magento/product-enterprise-edition[2.1.9] but these are rejected by your constraint.
I have the correct keys to download the latest version using composer but would like to know what this message means so that I can resolve it?
Does anyone know what the message is referring to? Is the constraint based on a dependency in the codebase or the Magento account itself?
Edit: running composer require magento/product-enterprise-edition 2.2.3 --no-update
I get the following response:
[InvalidArgumentException]
Could not find a matching version of package magento/product-enterprise-edition. Check the package spelling, your version constraint and that the package is available in a stability which
matches your minimum-stability (alpha).
Solution
Connect you via SSH in the root of you Magento
The method is :
composer require <product> <version> --no-update
, so according to your version you have to run this:
composer require magento/product-enterprise-edition 2.2.3 --no-update
rm -rf /generated rm -rf /var/cache/ rm -rf /var/page_cache/ php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento indexer:reindex
More informations in Magento DevDocs