One of the most common questions when working with Magento 2 is: should I override a class with a preference, or use a plugin? The answer is almost always the same – use a plugin. But “almost” does a lot of work here. I explain the differences and show when a preference makes sense.

(more…)

Everyone starts with var_dump() and die(). But after a few years working with PHP and Magento 2, those methods start to hurt – especially when debugging a complex order flow with dozens of plugins. I show how to set up Xdebug and why it is worth doing once, properly.

(more…)

PHP 7.2 was released in November 2017, but in practice many projects are only migrating to this version now. If you are still on 7.0 or 7.1 – this post is for you. I go through the most important changes that have a real impact on everyday code.

(more…)

TOP