3

I am trying to update Magento from version 2.2.6 to 2.3, but i get this errors:

sh-4.2# composer require magento/product-community-edition 2.3.0 --no-update ./composer.json has been updated

sh-4.2# composer update 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 - The requested package magento/magento-cloud-metapackage could not be found in any version, there may be a typo in the package name.

Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details. - It's a private package and you forgot to add a custom repository to find it

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

This is the composer version:

sh-4.2# composer --version Composer version 1.7.3 2018-11-01 10:05:06

And this is the composer file.

sh-4.2# more composer.json

{
    "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.3.0",
        "composer/composer": "@alpha",
        "codeko/redsys": "3.0.6",
        "eusonlito/magento2-language-es_es": "^0.0.8",
        "mageplaza/magento-2-spanish-language-pack": "dev-master",
        "lcbrq/magento2-dateformatpatch": "^1.0",
        "magento/magento-cloud-metapackage": "2.3.0"
    },
    "require-dev": {
        "phpunit/phpunit": "~6.2.0",
        "squizlabs/php_codesniffer": "3.2.2",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.5.2",
        "lusitanian/oauth": "~0.8.10",
        "sebastian/phpcpd": "~3.0.0",
        "friendsofphp/php-cs-fixer": "~2.10.1"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "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": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "magento": {
            "type": "composer",
            "url": "https://repo.magento.com/packages.json"
        }
    },
    "extra": {
        "magento-force": "override"
    }
}

Any idea?

Regards, JOINSO

2
  • Congrats on finding a solution to your problem! Please mark your question as answered!
    – paj
    Commented Dec 1, 2018 at 7:53
  • Thanks for the hint! I add an answer, that is better than put it inside the question!
    – JOINSO
    Commented Dec 2, 2018 at 19:06

2 Answers 2

6

Solved using following steps:

Come back to the previous version of composer.json Following instruction from How to Upgrade magento version from 2.2.X to 2.3.0?

In the last step, it says: sjparkinson/static-review is not required in your composer.json and has not been removed fabpot/php-cs-fixer is not required in your composer.json and has not been removed

Run: # composer upgrade

Then you can get errors like this when you try to do:

php bin/magento setup:upgrade ... Class 'Zend\Mvc\Controller\LazyControllerAbstractFactory' not found ...

So you must to edit the composer.json file and modify the autoload section:

"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/",
        "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
    },
},

Then run: > composer dumpautoload

And rerun: > php bin/magento setup:upgrade

And it works!

0

I was facing the same error while upgrading from Magento 2.2.6 Enterprise to Magento 2.3.2 Enterprise. This error occurs most probably due to composer issue. I reinstalled the composer then I executed the below commands and it upgraded my Magento version without any error.

composer require magento/product-enterprise-edition 2.3.2 --no-update

then

composer update

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.