Every PHP developer eventually faces the question: how to set up a local environment? For years XAMPP was the default answer. Today we have far more options – and far more reasons to move away from XAMPP to Docker-based tools. I compare three popular approaches from the perspective of working with PHP and Magento 2.

(more…)

Linear search always works. You go through every element one by one and eventually find what you are looking for. The problem appears with 100,000 elements when you do this in a loop. Binary search solves that problem elegantly – but only if the data is sorted.

(more…)

Observer is one of the most commonly used patterns in object-oriented programming, and in the Magento 2 ecosystem it is built into the core of the platform. If you have ever written an event observer in Magento, you have used this pattern – often without realising it.

(more…)

Directly using Magento 2 models in your own code is a tempting shortcut. The model is right there, it has the method you need, it works. The problem appears when Magento is updated and the internal implementation changes. Service Contracts are Magento’s answer – a stable, public API separated from the implementation.

(more…)

TOP