Followed below commands to upgrade Magento 2.1.9
to 2.2.0
using terminal
1.
composer require magento/product-community-edition 2.2.0 --no-update
2.
composer require \
magento/module-bundle-sample-data:100.2.* \
magento/module-widget-sample-data:100.2.* \
magento/module-theme-sample-data:100.2.* \
magento/module-catalog-sample-data:100.2.* \
magento/module-customer-sample-data:100.2.* \
magento/module-cms-sample-data:100.2.* \
magento/module-catalog-rule-sample-data: 100.2.* \
magento/module-sales-rule-sample-data:100.2.* \
magento/module-review-sample-data:100.2.* \
magento/module-tax-sample-data:100.2.* \
magento/module-sales-sample-data:100.2.* \
magento/module-grouped-product-sample-data:100.2.* \
magento/module-downloadable-sample-data:100.2.* \
magento/module-msrp-sample-data:100.2.* \
magento/module-configurable-sample-data:100.2.* \
magento/module-product-links-sample-data:100.2.* \
magento/module-wishlist-sample-data:100.2.* \
magento/module-swatches-sample-data:100.2.* \
magento/sample-data-media:100.2.* \
magento/module-offline-shipping-sample-data:100.2.* --no-update
3.
composer update
4.
php bin/magento setup:upgrade
composer.json after upgrade from 2.1.9 to 2.2.0
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.9",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/product-community-edition": "2.2.0",
"composer/composer": "@alpha",
"magento/module-bundle-sample-data": "100.2.*",
"magento/module-theme-sample-data": "100.2.*",
"magento/module-catalog-sample-data": "100.2.*",
"magento/module-cms-sample-data": "100.2.*",
"magento/module-widget-sample-data": "100.2.*",
"magento/module-tax-sample-data": "100.2.*",
"magento/module-customer-sample-data": "100.2.*",
"magento/module-catalog-rule-sample-data": "100.2.*",
"magento/module-sales-rule-sample-data": "100.2.*",
"magento/module-sales-sample-data": "100.2.*",
"magento/module-grouped-product-sample-data": "100.2.*",
"magento/module-downloadable-sample-data": "100.2.*",
"magento/module-msrp-sample-data": "100.2.*",
"magento/module-configurable-sample-data": "100.2.*",
"magento/module-product-links-sample-data": "100.2.*",
"magento/module-wishlist-sample-data": "100.2.*",
"magento/module-review-sample-data": "100.2.*",
"magento/module-swatches-sample-data": "100.2.*",
"magento/sample-data-media": "100.2.*",
"magento/module-offline-shipping-sample-data": "100.2.*"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
"squizlabs/php_codesniffer": "1.5.3",
"phpmd/phpmd": "@stable",
"pdepend/pdepend": "2.4.0",
"fabpot/php-cs-fixer": "~1.2",
"lusitanian/oauth": "~0.3 <=0.7.0",
"sebastian/phpcpd": "2.0.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,
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
"extra": {
"magento-force": "override"
}
}
composer.json after fresh installation of 2.2.0
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.2.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/product-community-edition": "2.2.0",
"composer/composer": "@alpha",
"magento/module-bundle-sample-data": "100.2.*",
"magento/module-catalog-sample-data": "100.2.*",
"magento/module-customer-sample-data": "100.2.*",
"magento/module-theme-sample-data": "100.2.*",
"magento/module-widget-sample-data": "100.2.*",
"magento/module-cms-sample-data": "100.2.*",
"magento/module-review-sample-data": "100.2.*",
"magento/module-tax-sample-data": "100.2.*",
"magento/module-msrp-sample-data": "100.2.*",
"magento/module-sales-sample-data": "100.2.*",
"magento/module-catalog-rule-sample-data": "100.2.*",
"magento/module-configurable-sample-data": "100.2.*",
"magento/module-product-links-sample-data": "100.2.*",
"magento/module-wishlist-sample-data": "100.2.*",
"magento/module-sales-rule-sample-data": "100.2.*",
"magento/module-downloadable-sample-data": "100.2.*",
"magento/module-grouped-product-sample-data": "100.2.*",
"magento/module-swatches-sample-data": "100.2.*",
"magento/sample-data-media": "100.2.*",
"magento/module-offline-shipping-sample-data": "100.2.*"
},
"require-dev": {
"phpunit/phpunit": "~6.2.0",
"squizlabs/php_codesniffer": "3.0.1",
"phpmd/phpmd": "@stable",
"pdepend/pdepend": "2.5.0",
"friendsofphp/php-cs-fixer": "~2.1.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/"
]
},
"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"
}
}
Does the difference in both composer.json could create issues in future development ?
Is it advisable to upgrade or install fresh copy in case there is no real data except sample data ?
Is it advisable to upgrade or install fresh copy in case there is live data available ?
P.S. Upgrade process provides some clarity that what all things involved and we can prepare ourselves for future upgrade too. On the flip side, if we know the complete process and confident on the upgrade process then it's okay to uninstall and install the newer version. I am just brainstorming here so that we can take best route.