cancel
Showing results for 
Search instead for 
Did you mean: 

Problems upgrading from 2.2.5 to 2.3.1

Problems upgrading from 2.2.5 to 2.3.1

Hi,

 

I'm having major headaches upgrading from 2.2.5 to 2.3.1.  I am on CentOS 7.

centos-release-7-5.1804.4.el7.centos.x86_64

nginx version: nginx/1.12.2

 

I've followed all the steps on https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html 

 

I upgraded to PHP 7.1 with

yum -y install php71u php71u-common php71u-pdo php71u-mysqlnd php71u-opcache php71u-xml php71u-gd php71u-devel php71u-mysql php71u-intl php71u-mbstring php71u-bcmath php71u-json php71u-iconv php71u-soap php71u-mcrypt php71u-fpm

here's what I then get for version and modules:

 

bash-4.2$ php -v
PHP 7.1.27 (cli) (built: Mar 7 2019 12:14:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.27, Copyright (c) 1999-2018, by Zend Technologies
bash-4.2$ php -me
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

 

Re-did all PHP & php-fpm settings as per https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html - checked permissions, all fine & storefront working.

 

Here's my composer.json prior to any amendment

{
    "name": "magento/magento2ce",
    "description": "Magento 2 (Open Source)",
    "type": "project",
    "version": "2.2.5",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "php": "~7.0.13|~7.1.0",
        "zendframework/zend-stdlib": "^2.7.7",
        "zendframework/zend-code": "~3.1.0",
        "zendframework/zend-server": "^2.6.1",
        "zendframework/zend-soap": "^2.6.0",
        "zendframework/zend-uri": "^2.5.1",
        "zendframework/zend-validator": "^2.6.0",
        "zendframework/zend-crypt": "^2.6.0",
        "zendframework/zend-console": "^2.6.0",
        "zendframework/zend-modulemanager": "^2.7",
        "zendframework/zend-mvc": "~2.7.12",
        "zendframework/zend-text": "^2.6.0",
        "zendframework/zend-i18n": "^2.7.3",
        "zendframework/zend-eventmanager": "^2.6.3",
        "zendframework/zend-view": "^2.8.1",
        "zendframework/zend-servicemanager": "^2.7.8",
        "zendframework/zend-json": "^2.6.1",
        "zendframework/zend-config": "^2.6.0",
        "zendframework/zend-form": "^2.10.0",
        "zendframework/zend-di": "^2.6.1",
        "zendframework/zend-serializer": "^2.7.2",
        "zendframework/zend-log": "^2.9.1",
        "zendframework/zend-http": "^2.6.0",
        "zendframework/zend-db": "^2.8.2",
        "zendframework/zend-captcha": "^2.7.1",
        "zendframework/zend-session": "^2.7.3",
        "magento/zendframework1": "~1.13.0",
        "colinmollenhour/credis": "1.8.2",
        "colinmollenhour/php-redis-session-abstract": "1.3.4",
        "colinmollenhour/cache-backend-redis": "1.10.4",
        "colinmollenhour/cache-backend-file": "1.4",
        "composer/composer": "1.4.1",
        "monolog/monolog": "^1.17",
        "oyejorge/less.php": "~1.7.0",
        "pelago/emogrifier": "^2.0.0",
        "tubalmartin/cssmin": "4.1.1",
        "magento/magento-composer-installer": ">=0.1.11",
        "braintree/braintree_php": "3.28.0",
        "symfony/console": "~2.3, !=2.7.0",
        "symfony/event-dispatcher": "~2.1",
        "symfony/process": "~2.1",
        "phpseclib/phpseclib": "2.0.*",
        "tedivm/jshrink": "~1.3.0",
        "magento/composer": "~1.2.0",
        "lib-libxml": "*",
        "ext-ctype": "*",
        "ext-gd": "*",
        "ext-spl": "*",
        "ext-dom": "*",
        "ext-simplexml": "*",
        "ext-mcrypt": "*",
        "ext-bcmath": "*",
        "ext-hash": "*",
        "ext-curl": "*",
        "ext-iconv": "*",
        "ext-intl": "*",
        "ext-xsl": "*",
        "ext-mbstring": "*",
        "ext-openssl": "*",
        "ext-zip": "*",
        "ext-pdo_mysql": "*",
        "ext-soap": "*",
        "ramsey/uuid": "~3.7.3",
        "magento/data-migration-tool": "2.2.5",
        "ebizmarts/sagepaysuite": "^1.2"
    },
    "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"
    },
    "replace": {
        "magento/module-marketplace": "100.2.2",
        "magento/module-admin-notification": "100.2.3",
        "magento/module-advanced-pricing-import-export": "100.2.3",
        "magento/module-analytics": "100.2.2",
        "magento/module-authorization": "100.2.1",
        "magento/module-authorizenet": "100.2.1",
        "magento/module-backend": "100.2.5",
        "magento/module-backup": "100.2.4",
        "magento/module-braintree": "100.2.5",
        "magento/module-bundle": "100.2.4",
        "magento/module-bundle-import-export": "100.2.2",
        "magento/module-cache-invalidate": "100.2.1",
        "magento/module-captcha": "100.2.2",
        "magento/module-catalog": "102.0.5",
        "magento/module-catalog-analytics": "100.2.1",
        "magento/module-catalog-import-export": "100.2.4",
        "magento/module-catalog-inventory": "100.2.4",
        "magento/module-catalog-rule": "101.0.4",
        "magento/module-catalog-rule-configurable": "100.2.1",
        "magento/module-catalog-search": "100.2.4",
        "magento/module-catalog-url-rewrite": "100.2.4",
        "magento/module-catalog-widget": "100.2.2",
        "magento/module-checkout": "100.2.5",
        "magento/module-checkout-agreements": "100.2.1",
        "magento/module-cms": "102.0.5",
        "magento/module-cms-url-rewrite": "100.2.1",
        "magento/module-config": "101.0.5",
        "magento/module-configurable-import-export": "100.2.2",
        "magento/module-configurable-product": "100.2.5",
        "magento/module-configurable-product-sales": "100.2.2",
        "magento/module-contact": "100.2.2",
        "magento/module-cookie": "100.2.1",
        "magento/module-cron": "100.2.3",
        "magento/module-currency-symbol": "100.2.1",
        "magento/module-customer": "101.0.5",
        "magento/module-customer-analytics": "100.2.1",
        "magento/module-customer-import-export": "100.2.3",
        "magento/module-deploy": "100.2.4",
        "magento/module-developer": "100.2.3",
        "magento/module-dhl": "100.2.2",
        "magento/module-directory": "100.2.4",
        "magento/module-downloadable": "100.2.4",
        "magento/module-downloadable-import-export": "100.2.1",
        "magento/module-eav": "101.0.4",
        "magento/module-email": "100.2.3",
        "magento/module-encryption-key": "100.2.1",
        "magento/module-fedex": "100.2.2",
        "magento/module-gift-message": "100.2.1",
        "magento/module-google-adwords": "100.2.1",
        "magento/module-google-analytics": "100.2.3",
        "magento/module-google-optimizer": "100.2.2",
        "magento/module-grouped-import-export": "100.2.1",
        "magento/module-grouped-product": "100.2.3",
        "magento/module-import-export": "100.2.5",
        "magento/module-indexer": "100.2.3",
        "magento/module-instant-purchase": "100.2.1",
        "magento/module-integration": "100.2.3",
        "magento/module-layered-navigation": "100.2.2",
        "magento/module-media-storage": "100.2.1",
        "magento/module-msrp": "100.2.1",
        "magento/module-multishipping": "100.2.2",
        "magento/module-new-relic-reporting": "100.2.3",
        "magento/module-newsletter": "100.2.4",
        "magento/module-offline-payments": "100.2.1",
        "magento/module-offline-shipping": "100.2.3",
        "magento/module-page-cache": "100.2.2",
        "magento/module-payment": "100.2.3",
        "magento/module-paypal": "100.2.3",
        "magento/module-persistent": "100.2.1",
        "magento/module-product-alert": "100.2.2",
        "magento/module-product-video": "100.2.3",
        "magento/module-quote": "101.0.4",
        "magento/module-quote-analytics": "100.2.1",
        "magento/module-release-notification": "100.2.2",
        "magento/module-reports": "100.2.5",
        "magento/module-require-js": "100.2.2",
        "magento/module-review": "100.2.5",
        "magento/module-review-analytics": "100.2.1",
        "magento/module-robots": "100.2.2",
        "magento/module-rss": "100.2.1",
        "magento/module-rule": "100.2.2",
        "magento/module-sales": "101.0.4",
        "magento/module-sales-analytics": "100.2.1",
        "magento/module-sales-inventory": "100.2.1",
        "magento/module-sales-rule": "101.0.3",
        "magento/module-sales-sequence": "100.2.1",
        "magento/module-sample-data": "100.2.3",
        "magento/module-search": "100.2.4",
        "magento/module-security": "100.2.2",
        "magento/module-send-friend": "100.2.1",
        "magento/module-shipping": "100.2.5",
        "magento/module-signifyd": "100.2.2",
        "magento/module-sitemap": "100.2.4",
        "magento/module-store": "100.2.4",
        "magento/module-swagger": "100.2.3",
        "magento/module-swatches": "100.2.3",
        "magento/module-swatches-layered-navigation": "100.2.1",
        "magento/module-tax": "100.2.5",
        "magento/module-tax-import-export": "100.2.1",
        "magento/module-theme": "100.2.5",
        "magento/module-translation": "100.2.4",
        "magento/module-ui": "101.0.5",
        "magento/module-ups": "100.2.3",
        "magento/module-url-rewrite": "101.0.4",
        "magento/module-user": "101.0.3",
        "magento/module-usps": "100.2.3",
        "magento/module-variable": "100.2.4",
        "magento/module-vault": "101.0.3",
        "magento/module-version": "100.2.1",
        "magento/module-webapi": "100.2.3",
        "magento/module-webapi-security": "100.2.2",
        "magento/module-weee": "100.2.2",
        "magento/module-widget": "101.0.3",
        "magento/module-wishlist": "101.0.3",
        "magento/module-wishlist-analytics": "100.2.1",
        "magento/theme-adminhtml-backend": "100.2.3",
        "magento/theme-frontend-blank": "100.2.3",
        "magento/theme-frontend-luma": "100.2.4",
        "magento/language-de_de": "100.2.0",
        "magento/language-en_us": "100.2.0",
        "magento/language-es_es": "100.2.0",
        "magento/language-fr_fr": "100.2.0",
        "magento/language-nl_nl": "100.2.0",
        "magento/language-pt_br": "100.2.0",
        "magento/language-zh_hans_cn": "100.2.0",
        "magento/framework": "101.0.5",
        "trentrichardson/jquery-timepicker-addon": "1.4.3",
        "components/jquery": "1.11.0",
        "blueimp/jquery-file-upload": "5.6.14",
        "components/jqueryui": "1.10.4",
        "twbs/bootstrap": "3.1.0",
        "tinymce/tinymce": "3.4.7"
    },
    "extra": {
        "component_paths": {
            "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js",
            "components/jquery": [
                "lib/web/jquery.js",
                "lib/web/jquery/jquery.min.js",
                "lib/web/jquery/jquery-migrate.js"
            ],
            "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader",
            "components/jqueryui": [
                "lib/web/jquery/jquery-ui.js"
            ],
            "twbs/bootstrap": [
                "lib/web/jquery/jquery.tabs.js"
            ],
            "tinymce/tinymce": "lib/web/tiny_mce"
        }
    },
    "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"
        ],
        "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": {
        "magento": {
            "type": "composer",
            "url": "https://repo.magento.com"
        },
        "ebizmarts": {
            "type": "composer",
            "url": "https://packages.ebizmarts.com"
        }
    }
}

 

I notice this is much larger than the composer.json in the current basic 2.3.1 download.

 

I then tried the upgrade script option with

php -f pre_composer_update_2.3.php -- --root='/var/www/magento/html/magento2' --repo=https://repo.magento.com/


InvalidArgumentException: No Magento metapackage found in /var/www/magento/html/magento2/composer.json

 

Unsure of where to go with that, I try the manual CLI upgrade.  After setting export DATA_CONVERTER_BATCH_SIZE=100000

 

I follow the addition/ removal steps as directed:

bash-4.2$ composer require magento/product-community-edition=2.3.1 --no-update
./composer.json has been updated

bash-4.2$ composer require --dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 --no-update
./composer.json has been updated

bash-4.2$ composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update
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

Then try a composer update

bash-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
    - Installation request for magento/product-community-edition 2.3.1 -> satisfiable by magento/product-community-edition[2.3.1].
    - magento/product-community-edition 2.3.1 requires braintree/braintree_php 3.35.0 -> satisfiable by braintree/braintree_php[3.35.0] but these conflict with your requirements or minimum-stability.
    "version": "2.3.1",
  Problem 2
        "OSL-3.0",
    - friendsofphp/php-cs-fixer v2.10.5 requires symfony/console ^3.2 || ^4.0 -> satisfiable by symfony/console[3.2.x-dev, 3.3.x-dev, 3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, 4.3.x-dev, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1, v4.1.10, v4.1.11, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5] but these conflict with your requirements or minimum-stability.

So I go into composer.json and amend the braintree/braintree_php and symfony/console entries to match and run it again.  I end up doing this about 15 times trying to meet a satifyable set of packages.

 

When I next run composer update it actually updates the packages - this is the output I got: https://drive.google.com/open?id=17gPCP6bInLfxiHuS1wb6_OAledr4x3cS

but then dies at the end with:

  [InvalidArgumentException]
  Package is not installed: magento/project-community-edition-2.3.1.0

So I have to restore the server prior to any changes.

 

What problem am I missing/ doing wrong here please?

 

3 REPLIES 3

Re: Problems upgrading from 2.2.5 to 2.3.1

Hi there,

Just wondering if anyone had any ideas on this.  I am a bit stumped on what to try next.  Raise a bug report maybe?  Any thoughts would be really welcome.

Thanks

Ben

Re: Problems upgrading from 2.2.5 to 2.3.1

I am still at my wits end with this, stuck and unable to upgrade.

 

I had a look at the update script: https://github.com/magento/magento2/blob/2.3-develop/dev/tools/UpgradeScripts/pre_composer_update_2....

And from line 95:

$metapackageMatcher = '/^magento\/product\-(?<edition>community|enterprise)\-edition$/';

 

I see in the root composer.json it is looking for (in my case)

"name": "magento/project-community-edition",

However I have:

"name": "magento/magento2ce",

I read https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/composer-integration.html but I don't really understand from that how/ why mine is "wrong".

 

I am wondering if I missed out an upgrade or something?  Any help would be really appreciated...

Re: Problems upgrading from 2.2.5 to 2.3.1

Hi @A1Ben 

I have the same issue, at the end did you find the solution? Smiley Happy


Cheers,