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.48k stars 9.29k forks source link

Composer upgrade to 2.1.0-rc2 fails with dependency version conflict on magento/framework #4923

Closed Vinai closed 8 years ago

Vinai commented 8 years ago

Steps to reproduce

  1. Install 2.1.0-rc1 with sample data using composer create-project
  2. Run composer require magento/product-community-edition 2.1.0-rc2

    Expected result

Magento being upgraded to release 2.1.0-rc2.

Actual result

$ composer require magento/product-community-edition 2.1.0-rc2
./composer.json has been updated
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
    - Can only install one of: magento/framework[100.1.0-rc2, 100.1.0-rc1].
    - Can only install one of: magento/framework[100.1.0-rc2, 100.1.0-rc1].
    - Can only install one of: magento/framework[100.1.0-rc1, 100.1.0-rc2].
    - magento/product-community-edition 2.1.0-rc2 requires magento/framework 100.1.0-rc2 -> satisfiable by magento/framework[100.1.0-rc2].
    - Installation request for magento/product-community-edition 2.1.0-rc2 -> satisfiable by magento/product-community-edition[2.1.0-rc2].
    - Installation request for magento/framework == 100.1.0.0-RC1 -> satisfiable by magento/framework[100.1.0-rc1].

Additional information

Here is the composer.json for the 2.1.0-rc1 installation, before attempting the upgrade.

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "require": {
        "magento/product-community-edition": "2.1.0-rc1",
        "composer/composer": "@alpha",
        "magento/module-bundle-sample-data": "100.1.*",
        "magento/module-theme-sample-data": "100.1.*",
        "magento/module-widget-sample-data": "100.1.*",
        "magento/module-catalog-sample-data": "100.1.*",
        "magento/module-customer-sample-data": "100.1.*",
        "magento/module-cms-sample-data": "100.1.*",
        "magento/module-tax-sample-data": "100.1.*",
        "magento/module-review-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-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": "2.3.*",
        "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"
    }
}
fooman commented 8 years ago

I think installation with sample data was never supported for the first release candidate.

Vinai commented 8 years ago

@fooman yes it was. Only if it was an upgrade from 2.0, the sample data versions had to be set to 100.1.* manually.

fooman commented 8 years ago

Are there any published sample data modules for rc2? If not it would make sense that this blocks the upgrade if any of sample modules themselves have a dependency on magento/framework 100.1.0.0-RC1

Vinai commented 8 years ago

Tbh I have not checked where exactly the dependency on magento/framework 100.1.0-rc1 is stated. No time atm, so I only created this issue.

fooman commented 8 years ago

Just tried it with your composer.json

composer require magento/product-community-edition:2.1.0-rc2

did not work for me either with a similar message you have. However using

composer require magento/product-community-edition:2.1.0-rc2 --update-with-dependencies

worked.

Vinai commented 8 years ago

Nice! Thanks, I didn't know the --update-with-dependencies flag.

fooman commented 8 years ago

Neither does the official ReadMe - so maybe leave this issue open so that that can be updated.

refaelgold commented 8 years ago

follow...

ghost commented 8 years ago

FWIW, we documented a slightly different method using --no-update: http://devdocs.magento.com/guides/v2.0/comp-mgr/cli/cli-rc1-samp.html

andimov commented 8 years ago

@Vinai Thank you for reporting this issue. As far as I understand this issue is not actual and I can close it. Please feel free to reopen if it's needed.