Repository pattern – interface, implementation, SearchCriteria, testing with mock
Repository is a pattern that separates business logic from the details of data access. Instead of scattering SQL queries or ORM calls throughout the application, you have one class responsible for fetching and saving entities. In Magento 2 Repository is part of Service Contracts – a standard, not an option. I show how to build your own Repository from scratch and why it is worth doing.
- Published in Wzorce projektowe
Akeneo PIM – why a PIM, REST API, attribute mapping, cron import
When a shop has several thousand products with dozens of attributes in several languages, managing product data directly in Magento becomes a real pain. Akeneo PIM solves this – it centralises product data and delivers it to Magento (and other channels) through an API. I show why you would want a PIM and what the technical integration looks like.
- Published in Magento / Adobe Commerce, PIM
Docker from scratch – Dockerfile, nginx, docker-compose, Xdebug 3.x
DDEV works great day to day, but what if you need a custom configuration DDEV does not support? Or you want to understand what is happening under the hood? I show how to build a PHP environment from scratch with pure Docker and docker-compose – nginx, PHP-FPM, MySQL and Redis with no intermediate tools.
- Published in Środowiska
Doubly linked list – implementation from scratch, SplDoublyLinkedList, comparison table
PHP array is versatile enough that we rarely need other data structures. But a doubly linked list has properties an array does not – inserting and removing elements from the middle in O(1), without shifting the remaining elements. I implement one from scratch in PHP and show when it is worth reaching for.
- Published in Algorytmy
