Magento – Upgrade Magento 2 via composer not working

composerjsonmagento2upgrade

I try to upgrade Magento 2.1.6 to Magento 2.1.9.

To do this I ran this command:

composer require magento/product-community-edition 2.1.9 --no-update

after this I ran : composer update and I received this error:

Your requirements could not be resolved to an installable set of packages.

Problem 1

  • The requested package magento/product-community-edition 2.1.9 exists as magento/product-community-edition[2.1.6] but these are rejected by
    your constraint

My composer.json look like this:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.1.9",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/product-community-edition": "2.1.9",
        "composer/composer": "@alpha",
        "ebizmarts/mailchimp-lib": "^3.0",
        "mailchimp/mc-magento2": "^1.0",
        "dividebv/phpdivideiq": "^0.5.0",
        "beberlei/assert": "^2.4"
    },
.........................................

Even I remove the rest of the extensions like this, is still not working

   "require": {
            "magento/product-community-edition": "2.1.6",
            "composer/composer": "@alpha"

        },

How I can avoid this issue?

Best Answer

In your composer.json edit your version number on line 5 and 11 to 2.1.9, Then just run composer update

Related Topic