Updating OXID eShop to 6.2.0

Oxid eShop 6.2 is released and its a good step forward to a modernized codebase, embracing best practices and more symfony-like patterns.

Since i do a lot of coding with symfony besides OXID i was very exited about this new version. So i gave it a try and updated one of the shops i maintain. (Its not public yet, i will update this post once we launch).

I basically followed this upgrade guide: https://docs.oxid-esales.com/eshop/de/6.2/installation/update/von-6.1.x-auf-6.2.0-aktualisieren.html

So here is my experience updating OXID eShop 6.1.5 to 6.2.0:

0. Update the Shop to latest 6.1 version and and also update all used modules to their latest version.
Since some sloppy things that were tolerated in modules before are now not tolerated anymore, we need to update the modules.
OXID 6.2. will throw errors when your modules metadata.php uses non strict code like constrains/contraints typo or wrong version number, which was tolerated before 6.2.

So to avoid errors like:
Module directory of /var/www/html/source/modules/ab/htmlmin could not be installed due to Metadata version 2 is not supported

…upgrade your modules and contact the maintainers if this issues are not fixed yet in their modules.

1. Update the composer.json
"require": {
"oxid-esales/oxideshop-metapackage-ce": "v6.2.0"
"require-dev": {
"oxid-esales/testing-library": "^v7.0.1",
"incenteev/composer-parameter-handler": "^v2.0.0",
"oxid-esales/oxideshop-ide-helper": "^v3.1.2",
"oxid-esales/azure-theme": "^v1.4.2"

2. Clear tmp dir:
rm -rf source/tmp/*

3. Run composer update
composer update --no-plugins --no-scripts --no-dev

4. Copy overridablefunctions.php
cp vendor/oxid-esales/oxideshop-ce/source/overridablefunctions.php source/

5. Run the composer scripts
composer update --no-dev

6. Run DB migrations
…there were no migrations in my case, tough.
vendor/bin/oe-eshop-db_migrate migrations:migrate

7. Migrate or update the modules
Require the module update helper component:
composer require --no-update oxid-esales/oxideshop-update-component
And run update:
composer update --no-dev --no-interaction
However this wasnt working and it removed all dev libraries and led to this error:
PHP Warning: Uncaught ErrorException: require(/var/www/html/vendor/composer/../ralouphie/getallheaders/src/getallheaders.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php:73

So i had to adjust the command and omit the –no-dev option.
composer update --no-interaction

8. Run creation of standard module yaml configuration
vendor/bin/oe-console oe:oxideshop-update-component:install-all-modules

9. Transfer module data from DB into new yaml configuration
vendor/bin/oe-console oe:oxideshop-update-component:transfer-module-data

10. Delete module configuration from DB
vendor/bin/oe-console oe:oxideshop-update-component:delete-module-data-from-database

11. Activate module with new configuration
vendor/bin/oe-console oe:module:apply-configuration

12. Remove module Updater again
composer remove --no-update oxid-esales/oxideshop-update-component
composer update --no-interaction

Same here: this worked only by omitting the –no-dev option.

13. Remove xd_receiver.htm
rm source/xd_receiver.htm

14. Once all was done clear the cache again
rm -rf source/tmp/*
You might experience an error with oxid-community/ocbcleartmp module.
[2020-04-14 17:40:16] OXID Logger.ERROR: Function 'isEEVersion' does not exist or is not accessible! (OxidEsales\Eshop\Application\Controller\Admin\NavigationController)

So clear tmp and deactivate the module and reactivate it again, solved this.
The module was still using not exisiting code from cache.

Thats it. Nice!
Upgrading went almost smooth.
Now im looking forward to use DependencyInjection, Custom Commands and Doctrine QueryBuilder in this updated shop.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.