magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Composer conflicts updating to CE2.1 #7206

Closed vanderlee closed 8 years ago

vanderlee commented 8 years ago

When trying to update CE2.0.10 to CE2.1 using composer, after applying the MDVA-532, I get version conflicts.

Preconditions

  1. Magento CE 2.0.10 with MDVA-532 patch applied

    Steps to reproduce

  2. composer require "magento/product-community-edition:2.1.*" --no-update
  3. composer update

    Expected result

  4. Updating the packages for latest CE2.1

    Actual result

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/product-community-edition 2.1.2 requires magento/module-wishlist 100.1.2 -> satisfiable by magento/module-wishlist[100.1.2].
    - Conclusion: don't install magento/module-wishlist 100.1.2
    - magento/product-community-edition 2.1.1 requires magento/module-wishlist 100.1.1 -> satisfiable by magento/module-wishlist[100.1.1].
    - Conclusion: don't install magento/module-wishlist 100.1.1
    - magento/product-community-edition 2.1.0 requires magento/module-wishlist 100.1.0 -> satisfiable by magento/module-wishlist[100.1.0].
    - Conclusion: don't install magento/module-wishlist 100.1.0
    - magento/product-community-edition 2.1.0-rc3 requires magento/module-wishlist 100.1.0-rc3 -> satisfiable by magento/module-wishlist[100.1.0-rc3].
    - Conclusion: don't install magento/module-wishlist 100.1.0-rc3
    - magento/product-community-edition 2.1.0-rc2 requires magento/module-wishlist 100.1.0-rc2 -> satisfiable by magento/module-wishlist[100.1.0-rc2].
    - Conclusion: don't install magento/module-wishlist 100.1.0-rc2
    - magento/module-wishlist-sample-data 100.0.5 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.6, 100.0.2, 100.0.3, 100.0.4, 100.0.5].
    - magento/module-wishlist-sample-data 100.0.2 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.6, 100.0.2, 100.0.3, 100.0.4, 100.0.5].
    - magento/module-wishlist-sample-data 100.0.3 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.6, 100.0.2, 100.0.3, 100.0.4, 100.0.5].
    - magento/module-wishlist-sample-data 100.0.4 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.6, 100.0.2, 100.0.3, 100.0.4, 100.0.5].
    - magento/module-wishlist-sample-data 100.0.5 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.6, 100.0.2, 100.0.3, 100.0.4, 100.0.5].
    - Can only install one of: magento/module-wishlist[100.1.0-rc1, 100.0.6].
    - Can only install one of: magento/module-wishlist[100.1.0-rc1, 100.0.2].
    - Can only install one of: magento/module-wishlist[100.1.0-rc1, 100.0.3].
    - Can only install one of: magento/module-wishlist[100.1.0-rc1, 100.0.4].
    - Can only install one of: magento/module-wishlist[100.1.0-rc1, 100.0.5].
    - Can only install one of: magento/module-wishlist[100.0.6, 100.1.0-rc1].
    - magento/product-community-edition 2.1.0-rc1 requires magento/module-wishlist 100.1.0-rc1 -> satisfiable by magento/module-wishlist[100.1.0-rc1].
    - Installation request for magento/product-community-edition 2.1.* -> satisfiable by magento/product-community-edition[2.1.0-rc1, 2.1.0-rc2, 2.1.0-rc3, 2.1.0, 2.1.1, 2.1.2].
    - Installation request for magento/module-wishlist-sample-data 100.0.* -> satisfiable by magento/module-wishlist-sample-data[100.0.5, 100.0.2, 100.0.3, 100.0.4].

I've tried fixing magento/module-wishlist to version ^100.0.0, 100.1.* and 100.1.2, all result in conflicts; those that require 100.0.x won't accept 100.1.x and (obviously) vice versa.

p.s. Same problem when trying to update through the Web Setup Wizard

BaDos commented 8 years ago

Hi @vanderlee

Thank you for for your feedback.

Do you get version conflicts without MDVA-532 patch? Did you install clear Magento and then apply patch?

I cannot reproduce it. I tried to reproduce it with/without MDVA-532

vanderlee commented 8 years ago

Didn't try without the patch because, as I understand it, it might have screwed up my database had it succeeded.

BaDos commented 8 years ago

Could you try to upgrade Magento once more? For example, on a local machine. I tried some variations of upgrading Magento. But the issue is not reproduced.

vanderlee commented 8 years ago

Other Magento 2 upgrades on other servers worked, I'm sure a new install on a different machine might work too.

What I don't understand is why the upgrade seems to fail on 2.1.0-rc1, 2.1.0-rc2 en 2.1.0-rc3. Why would an upgrade to 2.1.2 need to do anything with older rc versions? Might this be a problem with my composer.json file that? This is the current composer.json:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "mirasvit": {
            "type": "composer",
            "url": "https://17988:4f734ffb43@packages.mirasvit.com/"
        }
    },
    "require": {
        "magento/product-community-edition": "2.1.*",
        "composer/composer": "@alpha",
        "magento/module-bundle-sample-data": "100.0.*",
        "magento/module-theme-sample-data": "100.0.*",
        "magento/module-widget-sample-data": "100.0.*",
        "magento/module-catalog-sample-data": "100.0.*",
        "magento/module-customer-sample-data": "100.0.*",
        "magento/module-cms-sample-data": "100.0.*",
        "magento/module-catalog-rule-sample-data": "100.0.*",
        "magento/module-sales-rule-sample-data": "100.0.*",
        "magento/module-review-sample-data": "100.0.*",
        "magento/module-tax-sample-data": "100.0.*",
        "magento/module-sales-sample-data": "100.0.*",
        "magento/module-grouped-product-sample-data": "100.0.*",
        "magento/module-downloadable-sample-data": "100.0.*",
        "magento/module-msrp-sample-data": "100.0.*",
        "magento/module-configurable-sample-data": "100.0.*",
        "magento/module-product-links-sample-data": "100.0.*",
        "magento/module-wishlist-sample-data": "100.0.*",
        "magento/module-swatches-sample-data": "100.0.*",
        "magento/sample-data-media": "100.0.*",
        "magento/module-offline-shipping-sample-data": "100.0.*",
        "mirasvit/module-email": "^1.0",
        "mirasvit/module-feed": "^1.0",
        "magento/module-wishlist": "^100.0.0"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.2.2",
        "sjparkinson/static-review": "~4.1",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.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,
    "extra": {
        "magento-force": "override"
    }
}
BaDos commented 8 years ago

Yes, I reproduced it with your composer.json file.

You should change versions for all Data Modules to 100.1.* See for example Command-line upgrade to Magento 2.1 with sample data

Why did you write magento/module-wishlist in the require section? Remove it from the require section.

vanderlee commented 8 years ago

That worked! Thank you so much.

I didn't put the magento/module-wishlist in myself. Initially this site was installed using a tool called Installatron, which doesn't keep up with security issues hence the need to update manually. I guess Installatron put it in there.