0

I'm trying to upgrade via command line from 2.0.7 to 2.1.0 but I keep getting errors.

Here is what I did first:

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

Then I've got the error below (The requested package magento could not be found in any version), see image: enter image description here

I have tried using (product-community-edition 2.1 , product-community-edition 2.1.0 , product-community-edition 2.1.0-rc3) and nothing.

I tried to change the composer repo by using:

composer config repositories.magento composer repo.magento.com

Then I run again the commands to update and now I have a different error:

[Composer\Downloader\TransportException]

Your configuration does not allow connections to http://repo.magento.com/packages.json. See https://getco

Any help is appreciated.


Update - Posting Compose File

{
"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/"
    },
    "magento": {
        "type": "composer",
        "url": "repo.magento.com"
    }
},
"require": {
    "magento/product-community-edition": "2.1",
    "composer/composer": "@alpha",
    "magento": "2.0.1"
},
"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/"
    }
},
3
  • can you post your composer.json file? Commented Jul 7, 2016 at 19:47
  • Done. I have edited the post.
    – user37025
    Commented Jul 7, 2016 at 19:51
  • Did you solve your issue?
    – zus
    Commented Apr 18, 2018 at 11:28

2 Answers 2

2

Try to remove the part "magento": "2.0.1" as "magento/product-community-edition": "2.1", will already take care of the Magento installation.

Otherwise try to reinstall Magento based on the Documentation. http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install.html#integrator-first-composer-ce

1
  • Ok. It didn't work, however, you opened my eyes to changing two other things, first I rewrite line on the top ""version": "2.0.2"," to my current one ""version": "2.0.7"," then I changed " "url": "repo.magento.com"" including https and worked 100%. =D
    – user37025
    Commented Jul 7, 2016 at 20:27
0

Two problems in your original post:

  • composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation directory name> will work. You don't need 2.1.0 because it's the latest version (notice project instead of product)
  • The version has three numbers, so if you use it, use 2.1.0 instead of 2.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.