1

When upgrading from Magento 2.2.5 to Magento 2.2.6, it is output as follows.

$ cd /var/www/html/magento_project
$ php bin/magento maintenance:enable
$ composer update
$ composer require magento/product-community-edition 2.2.6 --no-update

./composer.json has been updated

And I can not upgrade.

Please tell me what to do.

  • Try this commands : git checkout composer.json ,composer clearcache, composer require magento/product-community-edition 2.2.6 --no-update, composer update – Ylgen Guxholli Oct 1 '18 at 10:09
  • Have you done setup upgrade? – Amit Bera Oct 1 '18 at 10:11
  • 1
    We thank you for your cooperation. I resolved it by running the command as instructed by Magento 2 Devloper. Thank you. – mr.hironobu Oct 1 '18 at 10:22
4

Open your root composer.Json and replace whole code with below.

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.2.6",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/product-community-edition": "2.2.6",
        "composer/composer": "@alpha"
    },
    "require-dev": {
        "phpunit/phpunit": "~6.2.0",
        "squizlabs/php_codesniffer": "3.2.2",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.5.2",
        "friendsofphp/php-cs-fixer": "~2.2.1",
        "lusitanian/oauth": "~0.8.10",
        "sebastian/phpcpd": "2.0.4"
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": [
                "app/code/",
                "generated/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "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": "stable",
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "extra": {
        "magento-force": "override"
    }
}

After update composer.json need to run below command.

 composer update
 php bin/magento s:up
 php bin/magento s:s:d -f
 php bin/magento c:c
 rm -rf var/cache/* generated/*

Note:: If you have uploaded any extension using composer command then you need to add lib in a composer.json

  • thank you for your cooperation. The command was executed according to the instructions of Magento 2 Devloper. I think that it succeeded. If another problem occurs, add comments. – mr.hironobu Oct 1 '18 at 10:24
  • ok if everything fine you can upvote this answer – Magento2 Devloper Oct 1 '18 at 10:30
  • Third party extensions are gone after updating. Is there a workaround for such cases? – mr.hironobu Oct 2 '18 at 4:37
  • Yes, You need to just copy in a composer.json file. check my note – Magento2 Devloper Oct 2 '18 at 5:15
  • like - "sebastian/phpcpd": "2.0.4" , you need to copy old composer.json to new – Magento2 Devloper Oct 2 '18 at 5:21
0

Run the commands in that order

php bin/magento maintenance:enable
composer require magento/product-community-edition 2.2.6 --no-update
composer update
  • The situation does not change. './composer.json has been updated' is output. – mr.hironobu Oct 1 '18 at 9:49
0
composer require magento/product-community-edition 2.2.6 --no-update
composer update
rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex

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.