1

I am upgrading Magento version 2.2.7 to 2.2.9 I used following commands on local setup

$ composer require "magento/magento-cloud-metapackage":"2.2.9" --no-update

$ composer update

But I am getting following error

Problem 1
    - The requested package magento/magento-cloud-metapackage (locked at 2.2.7, required as 2.2.9) is satisfiable by magento/magento-cloud-metapackage[2.2.7] but these conflict with your requirements or minimum-stability.


Problem 2
    - Can only install one of: magento/product-enterprise-edition[2.2.9, 2.2.7].
    - Can only install one of: magento/product-enterprise-edition[2.2.9, 2.2.7].
    - Can only install one of: magento/product-enterprise-edition[2.2.7, 2.2.9].
    - magento/magento-cloud-metapackage 2.2.9 requires magento/product-enterprise-edition 2.2.9 -> satisfiable by magento/product-enterprise-edition[2.2.9].

    - Installation request for magento/magento-cloud-metapackage 2.2.9 -> satisfiable by magento/magento-cloud-metapackage[2.2.9].

    - Installation request for magento/product-enterprise-edition (locked at 2.2.7) -> satisfiable by magento/product-enterprise-edition[2.2.7].

please provide solution to this problem.

Thanks in advance

1

Understanding Package Management

First off, any answers that suggest removing or editing the composer.lock file directly are wrong. Deleting composer.lock and regenerating will effectively upgrade every package to the latest version as specified by your composer.json file, and you should never edit the lock file directly.

magento/magento-cloud-metapackage is, as its name suggests, a meta-package - AKA a package that represents a collection of other packages that go together, as opposed to a module of code. In this case, the main dependency (or sub/child-package) here is magento/product-enterprise-edition which has been locked to an older version per your composer.lock.

Understanding Your Error

Assuming you don't have both the cloud and enterprise packages in your composer.json, what you need to tell composer is that you want to upgrade magento/magento-cloud-metapackage and any of its sub-packages or dependencies. Conveniently enough, composer update has a flag you can use for this.

What you want to run is the below:

$ composer require "magento/magento-cloud-metapackage":"2.2.9" --no-update
$ composer update --with-dependencies

or more concisely...

$ composer require "magento/magento-cloud-metapackage":"2.2.9" --update-with-dependencies

Hope that helps!

| improve this answer | |
0

Check your composer.json file and see if magento/product-enterprise-edition is included in it. If so, remove it and try again.

If that does not resolve the issue, you could also delete your composer.lock file and vendor folders locally and run composer update.

| improve this answer | |
0

Problem is in your composer.lock file present on the root on your local installation.

The issue is that your Magento version specified in the composer.lock file is 2.2.7 but you are upgrading to 2.2.9.

You can fix this problem by manually changing the version in the composer.lock file or replace it with the production's composer.lock file.

After that, run the below commands to upgrade Magento to 2.2.9.

rm -rf var/ generated/
chmod -R 777 var/ pub/ generated/
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Hope it helps you to find the solution.

| improve this answer | |

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.