November 25, 2018

What breaks when upgrading to Magento 2.3.0

Yireo Blog Post

Magento 2.3.0 is about to come out. And I've heard from many developers that they are not sure if they want to upgrade to this new version, even though it brings so many cool new features. Here is my personal view on what kind of things might cause issues when you upgrade to Magento 2.3. Hopefully, it helps you decide how (and when) to benefit from this great new release anyway.

So first all, a non-descriptive list

A lot has been written already on the new features, so here it goes: PWA Studio, MSI, GraphQL, declaritive schemas, asynchronous API, Page Builder, 2 awesome modules built by some Italians, message queue, ElasticSearch, PHP 7.2. Ok, that's done.

But this blog is not meant to discuss the new features. It is meant to cover the possible problems that come to rise when upgrading to Magento 2.3.

New composer packages

Because there are so many new features, there will be an introduction of a lot more composer packages: For instance, a lot of modules suddenly have a corresponding GraphQL module to add new GraphQL endpoints. There will be a package for Venia (part of the PWA Studio suite) and of course, there is MSI: A huge set (shitload) of modules, dealing with stock.

Every time that you choose to automatically install these new modules (as part of Magento 2.3), this could lead to possible version conflicts, unexpected setup tasks and more. Don't take upgrading lightly. This is a major upgrade. Version 2.3 is an anti-semantical version. I hate anti-semantites.

Optional modules

A modern practice is to use the replace composer trick to remove core modules from your own setup. Make sure to apply this to any new Magento 2.3 module that you don't need. If you don't need it, don't install it. It reduces the risk for bugs.

Magento is working on an alternative approach for module management. Instead of using a meta-package (magento/project-community-edition), it will become possible (in the future) to install just the modules that you want. I'm not sure if this is already the case with 2.3, I don't think so.

All of the new features mentioned above (PWA, MSI, GraphQL, etc) are supposed to be optional. And you can remove them. I trust that the integer_net blog post on removing modules will be updated for 2.3.

No requirement for PWA

Upgrading to PWA is not required. PWA Studio is only offered to frontend developers that do want to work with it. Nothing of the old frontend is deprecated. That's only for the future.

Shameless commercial note, Yireo has started offering React, GraphQL and Docker trainings to anticipate the move to microservices. We believe that PWA is going to change the landscape of Magento in the upcoming year.

Upgrade to Declaritive Schemas

One of the new features is Declaritive Schemas. I trust that you can find more information on how to use them elsewhere. Now, once a module is switched from the old Setup way to the schema approach, you can't rollback again (easily). Keep this in mind when upgrading to Magento 2.3: Once the production site is upgraded to 2.3, it will be hard to downgrade back to 2.2 again.

In short, make sure that this upgrade is tested first on an identical copy of your production database.

MySQL search is deprecated

MySQL FULLTEXT search was always an issue, even though later versions of MySQL (5.6+) have improved performance a lot. Still, doing text search properly remains a challenge. Magento 2.3 now marks the deprecation for MySQL as a search mechanism. It also introduces an ElasticSearch intgration to switch to.

On the long run, search will be run as a microservice using ElasticSearch or another search engine. Yireo has already started giving consults to merchants and system integrators to guide them into ElasticSearch, including a Docker strategy to allow devs to use search locally. Magento 2.3 does not change anything yet, but it is important to get ready. MySQL search is deprecated.

And now, some specific stuff

So far so good. Apart from some general upgrade advice, I have not bumped into huge issues with upgrading yet.

For the rest of the points, I have been going through the list of Backward Incompatible Changes and the official Release Notes, to see if something popped up in my mind. This is just an estimate. Real life will learn us many other different difficulties and/or bugs.

Saving products

There are some changes when saving a product (single quotes, Website-assigment, sort order, Use Default Value). Make sure to be aware of this after the upgrade. Possibly, you will test whether saving products causes unexpected issues. Possibly, you have some genius end-to-end tests running that test whether all products are saved properly in the Magento Admin Panel. Possibly, you simply inform the customer that he/she be should aware of possible issues after the upgrade - nothing more, nothing less.

customerData changes

The Release Notes mention some changes in customerData (Knockout syncing of session-specific data), preventing duplicate AJAX calls to be made. I bumped into this myself with our Yireo GoogleTagManager extension.

Theoretically, these duplicate calls is something that other extensions have become reliant upon, by creating workarounds. I don't know. Theoretically, this leads to new bugs with third party extensions.

Removal of Zend Framework 1 dependencies

Numerous steps were made to remove Zend Framework 1 dependencies from the core. Dependencies with Zend Framework need to be investigated in your own code or third party modules. Scan for class names starting with Zend_.

And then migrate code instead to composer-installable dependencies, possibly from Zend Framework 3 or Symfony. This removal of ZF1 code should not cause any issues in any third party modules, unless those modules do a bad job managing their own dependencies.

Deprecated classes and interfaces

The Release Notes mention a few other important things. There are some deprecated classes and interfaces, so it is definitely worth it to read through the notes yourself.

Low impact to upgrade to 2.3?

However, going through the documentation, I have not seen that many changes that seem to have impact. True, there is a lot of new features introduced in 2.3, but the impact on existing code might be low.

Ofcourse, this is just me speaking after having read the docs. Maybe interesting to note: I've installed various Yireo extensions under Magento 2.3 beta and encountered little issues. So from my perspective, (most of) my own extensions were usable under 2.3.

But still: Take your own responsibility to upgrade in a safe manner. I hope that this blog just makes you a bit more optimistic. Because all in all, Magento 2.3 will improve things on the long run.

Posted on November 25, 2018

About the author

Author Jisse Reitsma

Jisse Reitsma is the founder of Yireo, extension developer, developer trainer and 3x Magento Master. His passion is for technology and open source. And he loves talking as well.

Sponsor Yireo

Looking for a training in-house?

Let's get to it!

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.

Do not miss out on what we say

This will be the most interesting spam you have ever read

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.