3

When I am trying to upgrade my Magento version from 2.1.7 CE to 2.2.0 CE, through composer update, I am getting the following error.

Problem 1
- magento/module-wishlist-sample-data 100.1.0-rc1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.4, 100.1.5, 100.1.6].
- magento/module-wishlist-sample-data 100.1.0-rc2 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.4, 100.1.5, 100.1.6].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc1].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc2].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.2].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.3].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.5].
- Can only install one of: magento/module-wishlist[101.0.0, 100.1.6].
- magento/product-community-edition 2.2.0 requires magento/module-wishlist 101.0.0 -> satisfiable by magento/module-wishlist[101.0.0].

Here is my composer.json file, located in my project's root folder.

{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.7",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"require": {
    "magento/product-community-edition": "2.2.0",
    "composer/composer": "@alpha",
    "magento/module-bundle-sample-data": "100.1.*",
    "magento/module-theme-sample-data": "100.1.*",
    "magento/module-catalog-sample-data": "100.1.*",
    "magento/module-tax-sample-data": "100.1.*",
    "magento/module-customer-sample-data": "100.1.*",
    "magento/module-cms-sample-data": "100.1.*",
    "magento/module-widget-sample-data": "100.1.*",
    "magento/module-catalog-rule-sample-data": "100.1.*",
    "magento/module-sales-rule-sample-data": "100.1.*",
    "magento/module-sales-sample-data": "100.1.*",
    "magento/module-grouped-product-sample-data": "100.1.*",
    "magento/module-downloadable-sample-data": "100.1.*",
    "magento/module-msrp-sample-data": "100.1.*",
    "magento/module-configurable-sample-data": "100.1.*",
    "magento/module-product-links-sample-data": "100.1.*",
    "magento/module-wishlist-sample-data": "100.1.*",
    "magento/module-review-sample-data": "100.1.*",
    "magento/module-swatches-sample-data": "100.1.*",
    "magento/sample-data-media": "100.1.*",
    "magento/module-offline-shipping-sample-data": "100.1.*"
},
"require-dev": {
    "phpunit/phpunit": "4.1.0",
    "squizlabs/php_codesniffer": "1.5.3",
    "phpmd/phpmd": "@stable",
    "pdepend/pdepend": "2.4.0",
    "fabpot/php-cs-fixer": "~1.2",
    "lusitanian/oauth": "~0.3 <=0.7.0",
    "sebastian/phpcpd": "2.0.0"
},
"config": {
    "use-include-path": true
},
"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/"
    },
    "psr-0": {
        "": "app/code/"
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
    {
        "type": "composer",
        "url": "https://repo.magento.com/"
    }
],
"extra": {
    "magento-force": "override"
} }

Anyone know, how to fix this ?

3

You need to also update the sample data because it is installed for Magento 2.1 specifically. Alternatively remove it if you do not need it anymore.

This is what worked for me in a previous update:

  1. Reset sample data:

    bin/magento sampledata:reset
    
  2. Remove the sample data modules from composer.json:

    "magento/module-bundle-sample-data": "100.1.*",
    "magento/module-theme-sample-data": "100.1.*",
    "magento/module-catalog-sample-data": "100.1.*",
    "magento/module-tax-sample-data": "100.1.*",
    "magento/module-customer-sample-data": "100.1.*",
    "magento/module-cms-sample-data": "100.1.*",
    "magento/module-widget-sample-data": "100.1.*",
    "magento/module-catalog-rule-sample-data": "100.1.*",
    "magento/module-sales-rule-sample-data": "100.1.*",
    "magento/module-sales-sample-data": "100.1.*",
    "magento/module-grouped-product-sample-data": "100.1.*",
    "magento/module-downloadable-sample-data": "100.1.*",
    "magento/module-msrp-sample-data": "100.1.*",
    "magento/module-configurable-sample-data": "100.1.*",
    "magento/module-product-links-sample-data": "100.1.*",
    "magento/module-wishlist-sample-data": "100.1.*",
    "magento/module-review-sample-data": "100.1.*",
    "magento/module-swatches-sample-data": "100.1.*",
    "magento/sample-data-media": "100.1.*",
    "magento/module-offline-shipping-sample-data": "100.1.*"
    
  3. Run composer update

  4. Reinstall sample data:

    bin/magento sampledata:deploy
    
  • When I run the composer update, I got the output as follows, Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package fabpot/php-cs-fixer is abandoned, you should avoid using it. Use friendsofphp/php-cs-fixer instead. Generating autoload files – MGento Oct 27 '17 at 9:48
  • Did you really update the version number in composer.json to 2.2.0? Maybe that got reverted after your unsuccessful update – Fabian Schmengler Oct 27 '17 at 15:10
  • Yea, that was the issue. Now it's working fine. Thanks a lot :) – MGento Oct 28 '17 at 14:07
  • +1 for the answer. Worked for me. – Aditya Yadav May 11 at 6:19

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.