Update from 6.1.x to 6.2.0
This document describes the update from OXID eShop 6.1.0 and higher to OXID eShop 6.2.0. It differs from a standard update mainly in that the module configurations are taken from the database.
Updating the shop
In the file
composer.json
, which is located in the main directory of the shop, version must be changed. This concerns the section “require” and “require-dev”.
OXID eShop Community Edition 6.2.0
"require": {
"oxid-esales/oxideshop-metapackage-ce": "v6.2.0"
},
"require-dev": {
"oxid-esales/testing-library": "^v7.1.0",
"incenteev/composer-parameter-handler": "^v2.0",
"oxid-esales/oxideshop-ide-helper": "^v3.1.2",
"oxid-esales/azure-theme": "^v1.4.2"
},
OXID eShop Professional Edition 6.2.0
"require": {
"oxid-esales/oxideshop-metapackage-pe": "v6.2.0"
},
"require-dev": {
"oxid-esales/testing-library": "^v7.1.0",
"incenteev/composer-parameter-handler": "^v2.0",
"oxid-esales/oxideshop-ide-helper": "^v3.1.2",
"oxid-esales/azure-theme": "^v1.4.2"
},
OXID eShop Enterprise Edition 6.2.0
"require": {
"oxid-esales/oxideshop-metapackage-ee": "v6.2.0"
},
"require-dev": {
"oxid-esales/testing-library": "^v7.1.0",
"incenteev/composer-parameter-handler": "^v2.0",
"oxid-esales/oxideshop-ide-helper": "^v3.1.2",
"oxid-esales/azure-theme": "^v1.4.2"
},
Clear the directory with the temporary files of the shop, for example by calling a shell in the main directory of the shop and entering the following command:
rm -rf source/tmp/*
Execute the following Composer command in the shell to update dependencies. The --no-dev parameter is specified when the development-related files are not needed.
composer update --no-plugins --no-scripts --no-dev
Now copy the file
overridablefunctions.php
from the directory/vendor
of the shop into the directory/source
.
cp vendor/oxid-esales/oxideshop-ce/source/overridablefunctions.php source/
With a second Composer command all scripts are executed to get the new compilation. For shop files, themes and modules it must be confirmed that the update will overwrite existing files. If you have included your own modules with
type": "path"
in yourcomposer.json
file, please answer the question for overwriting with No.
composer update --no-dev
The third and last Composer command performs the migration of the database.
vendor/bin/oe-eshop-db_migrate migrations:migrate
Updating the module configurations
In this step, settings and activation status of the modules belonging to the shop are transferred from the database to configuration files *.yaml
.
With the following Composer commands, which are called in the main directory of the shop, you install the OXID eShop update component.
composer require --no-update oxid-esales/oxideshop-update-component:"^1.0"
composer update --no-dev --no-interaction
Clear the directory with the temporary files of the shop, for example by calling a shell in the main directory of the shop and entering the following command:
rm -rf source/tmp/*
A default configuration is created for all modules located in the
source/modules
directory. To do this, the new OXID eShop Console is called with the following command:
vendor/bin/oe-console oe:oxideshop-update-component:install-all-modules
The existing module data (module settings, class extension chains, activation status) are transferred from the database to the configuration files
*.yaml
.
vendor/bin/oe-console oe:oxideshop-update-component:transfer-module-data
After this step the option configured = true should be in the configuration file of all previously active modules. The configuration file now also contains the module settings. They are the same as those defined for the module in the administration panel.
To avoid data redundancy and problems when activating modules, their status and settings are removed from the database.
vendor/bin/oe-console oe:oxideshop-update-component:delete-module-data-from-database
All modules that were previously active are activated and the module settings are restored.
vendor/bin/oe-console oe:module:apply-configuration
Hint
In an Enterprise Edition environment with at least two shops and active legacy modules the command may trigger an error. The workaround is to run the command per individual shop by using parameter –shop-id.
Example:
vendor/bin/oe-console oe:module:apply-configuration --shop-id=1
vendor/bin/oe-console oe:module:apply-configuration --shop-id=2
Uninstall the OXID eShop update component
composer remove --no-update oxid-esales/oxideshop-update-component
composer update --no-dev --no-interaction
Removing old files
The file xd_receiver.htm
from the /source
directory is no longer needed and should be deleted.
Troubleshooting
Hints on possible problems with the transfer of status and settings of the modules can be found in the document Update from 6.1.x to 6.2.0 of the developer documentation.