PHP / Magento Dev Blog

  • Home

How to prepare your store for Q4 – a pre-season checklist

  • 0
Henryk Tews
Tuesday, 20 October 2026 / Published in E-commerce

The fourth quarter accounts for 40-60% of annual revenue for most e-commerce stores. Black Friday, Cyber Monday and Christmas shopping create traffic that far exceeds the average. Stores that didn’t prepare technically don’t lose orders to competitors – they simply can’t handle the load. Below is the checklist I go through with clients before every season.

(more…)

Custom Admin Grid in Magento 2 with UI Component

  • 0
Henryk Tews
Friday, 16 October 2026 / Published in Magento / Adobe Commerce

A custom admin grid in Magento 2 is a recurring task for any substantial module. Magento provides a full UI Component framework for it: declarative XML defines columns, filters, and actions, while PHP only supplies the DataProvider. Below is a minimal but complete example – from database migration through model to listing.xml.

(more…)

Iterator and Generator in PHP – the pattern and modern syntax

  • 0
Henryk Tews
Monday, 12 October 2026 / Published in Wzorce projektowe

The Iterator pattern defines sequential access to collection elements without exposing its internal structure. PHP implements it through the Iterator and IteratorAggregate interfaces. Generators (available since PHP 5.5) are syntactic sugar that simplifies writing iterators considerably – especially for lazily generating large datasets.

(more…)

Dynamic Programming in PHP – memoization and tabulation in practice

  • 0
Henryk Tews
Thursday, 08 October 2026 / Published in Algorytmy

Dynamic programming is a technique for solving problems by breaking them into smaller subproblems and caching the results. It’s used less frequently in PHP than in lower-level languages, but shows up wherever naive recursion is too slow. I cover two approaches: memoization (top-down) and tabulation (bottom-up) through concrete examples.

(more…)

Magento 2 Command + Message Queue – asynchronous background operations

  • 0
Henryk Tews
Sunday, 04 October 2026 / Published in Magento / Adobe Commerce

Magento 2 Command pattern with Message Queue combines two mechanisms: Command encapsulates an operation as an object, and Message Queue executes it asynchronously. In practice: instead of sending an email synchronously in an HTTP request (blocking the response), you push a message to a queue and a consumer handles it in the background. I show how to implement this using order notifications as an example.

(more…)

PHP 8.4 – property hooks, asymmetric visibility and new array functions

  • 0
Henryk Tews
Wednesday, 30 September 2026 / Published in PHP

PHP 8.4 has been available since November 2024. It brings property hooks – a native implementation of getters and setters without boilerplate, asymmetric property visibility (public private(set)), new array functions and deprecation of functions untouched since PHP 4. This evolution lets you write more concise code without giving up encapsulation.

(more…)

Xdebug 3 with DDEV for Magento 2 – PHPStorm, VS Code and profiler setup

  • 0
Henryk Tews
Saturday, 26 September 2026 / Published in Środowiska

Xdebug 3 changed the configuration model compared to version 2 – a single xdebug.mode directive replaces a dozen settings. Combined with DDEV, setting up debugging for Magento 2 is now significantly simpler than it was three years ago. I show how to run the step debugger in PHPStorm and VS Code, including debugging HTTP requests, CLI commands and unit tests.

(more…)

Magento 2 Service Contracts – Repository Interface, Data Interface and di.xml

  • 0
Henryk Tews
Tuesday, 22 September 2026 / Published in Magento / Adobe Commerce

Magento 2 has a built-in Service Contracts system based on interfaces and Data Interfaces. Instead of injecting models directly, you inject Repository and Data Interface interfaces. This is not just good practice – it is the only way to make a module work stably after updates and be compatible with other modules. I show how to correctly use Service Contracts using the product catalogue as an example.

(more…)

Proxy pattern – lazy loading, cache, access control and \Proxy in Magento 2 DI

  • 0
Henryk Tews
Friday, 18 September 2026 / Published in Wzorce projektowe

The Proxy pattern controls access to another object. The client thinks it is talking to the real object, but in reality it is talking to an intermediary that can add caching, logging, lazy loading, access control or remote access. In Magento 2 Proxy is a built-in mechanism – every class with the \Proxy suffix in the DI container is exactly this pattern.

(more…)

Hash Table – PHP implementation, O(1) lookup, deduplication and grouping

  • 0
Henryk Tews
Monday, 14 September 2026 / Published in Algorytmy

A hash table is a data structure with O(1) for insert, lookup and delete on average. PHP uses it internally for arrays – every PHP array is effectively a hash map. But knowing how it works under the hood lets you write more efficient code and understand why certain operations are fast and others surprisingly slow.

(more…)

  • 1
  • 2
  • 3

© 2026 Created by

TOP
Zarządzaj zgodą
Aby zapewnić jak najlepsze wrażenia, korzystamy z technologii, takich jak pliki cookie, do przechowywania i/lub uzyskiwania dostępu do informacji o urządzeniu. Zgoda na te technologie pozwoli nam przetwarzać dane, takie jak zachowanie podczas przeglądania lub unikalne identyfikatory na tej stronie. Brak wyrażenia zgody lub wycofanie zgody może niekorzystnie wpłynąć na niektóre cechy i funkcje.
Funkcjonalne Always active
Przechowywanie lub dostęp do danych technicznych jest ściśle konieczny do uzasadnionego celu umożliwienia korzystania z konkretnej usługi wyraźnie żądanej przez subskrybenta lub użytkownika, lub wyłącznie w celu przeprowadzenia transmisji komunikatu przez sieć łączności elektronicznej.
Preferencje
Przechowywanie lub dostęp techniczny jest niezbędny do uzasadnionego celu przechowywania preferencji, o które nie prosi subskrybent lub użytkownik.
Statystyka
Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do celów statystycznych. Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do anonimowych celów statystycznych. Bez wezwania do sądu, dobrowolnego podporządkowania się dostawcy usług internetowych lub dodatkowych zapisów od strony trzeciej, informacje przechowywane lub pobierane wyłącznie w tym celu zwykle nie mogą być wykorzystywane do identyfikacji użytkownika.
Marketing
Przechowywanie lub dostęp techniczny jest wymagany do tworzenia profili użytkowników w celu wysyłania reklam lub śledzenia użytkownika na stronie internetowej lub na kilku stronach internetowych w podobnych celach marketingowych.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Zobacz preferencje
  • {title}
  • {title}
  • {title}