Did you download version 1.0.0-beta from the releases page (or master branch), or off of the current develop branch?
My understanding is that the develop branch is not stable/sample data won't work, but it should be fine if you're using the official beta1 release. You can find that here: https://github.com/magento/magento2/releases
Process to update Magento 2.1 to 2.2:
For a full step by step instruction please refer to Upgrade Magento from 2.1 to 2.2.1 with sample data using composer (I created a new question because this one is specificly about "update vs. fresh install")
Answering your questions:
Does the difference in both composer.json could create issues in future development ?
Let's look at the diff:
"version": "2.2.0",
is the project version, which does not have any significance except that it tells you from which version you created the project. To avoid confusion I usually change that to the current Magento version during upgrade.
"require-dev": {
[...]
}
is relevant if you use any of the dev tools listed there. For example, if you run PHPUnit tests, you should update the PHPUnit version accordingly, as the new test suite is updated for PHPUnit 6 and does not work anymore on PHPUnit 4
"exclude-from-classmap": [
"**/dev/**",
"**/update/**",
"**/Test/**"
]
is an optimization for the autoloader. It makes sense to copy it to your composer.json but nothing should break if you don't.
"minimum-stability": "stable",
is the default stability requirement for dependencies. It looks like you changed it to alpha
for some reason, so that's up to you.
Is it advisable to upgrade or install fresh copy in case there is no real data except sample data ?
In that case, and if you did not install any extensions, it's easier to install a fresh copy (i.e. overwrite composer.json and run composer update
) because you can be sure that you don't miss anything and there are less manual steps.
Is it advisable to upgrade or install fresh copy in case there is live data available ?
With only live data it's the same as above, but if you installed any extensions, I'd rather update composer.json manually with changes from the latest version.
Best Answer
Remove Magento 2.1 sample data modules:
If you recieve an authentication error like this:
you have to copy your stored credentials for repo.magento.com to
var/composer_home
because this is the composer home directory forbin/magento
commandsSpecify new Magento version
For Open Source (CE):
For Commerce (EE):
(Replace
2.2.1
with the current version if there's a newer one)Update dev requirement versions
This is necessary if you use the testing tools bundled with Magento. The current required versions can be found here: https://github.com/magento/magento2/blob/2.2/composer.json#L76-L82
Trigger update
Review file permissions
You might need to set the correct file permissions again, for example make
bin/magento
executable:And give appropiate write permissions to the new
generated
directory.More info: http://devdocs.magento.com/guides/v2.2/install-gde/install/file-sys-perms-over.html
Reinstall sample data
Upgrade database
Compilations
If in production mode, also run the following compilation commands: