PHP / Magento Dev Blog

  • Home

PageBuilder – custom content type, XML config, JS preview, frontend rendering

  • 0
Henryk Tews
Tuesday, 11 July 2023 / Published in Magento / Adobe Commerce

PageBuilder is Magento 2’s drag-and-drop content editor that replaced the plain HTML textarea in admin. A custom content type lets merchants create complex layouts without HTML knowledge while giving developers full control over the output. I show the complete implementation: XML configuration, JavaScript preview in admin, and frontend rendering.

(more…)

State pattern – order state machine, serialisation, comparison with Strategy

  • 0
Henryk Tews
Tuesday, 13 June 2023 / Published in Wzorce projektowe

State is a behavioural pattern that allows an object to change its behaviour when its internal state changes. It looks like the object changed its class. The classic example is an order state machine – an order in “pending” status behaves differently from one in “processing”. I show an implementation in PHP and compare it with Strategy, which it superficially resembles.

(more…)

PHP 8.3 preview – typed constants, json_validate(), array_find(), clone with

  • 0
Henryk Tews
Tuesday, 09 May 2023 / Published in PHP

PHP 8.3 is due in November 2023 and while it is a conservative release compared to 8.0-8.2, it adds several things worth knowing about before they arrive. Typed class constants close an inconsistency in the type system. json_validate() saves a decode-and-discard pattern. array_find() and array_find_key() replace clunky array_filter() idioms. The readonly amendment allows re-initialisation in cloning.

(more…)

Drupal 10 – Entity Types, hooks, DI, headless via JSON:API, comparison with WP and Magento

  • 0
Henryk Tews
Tuesday, 11 April 2023 / Published in PHP

Drupal 10 is a significantly more modern platform than its reputation suggests. The rewrite to Symfony components, a proper DI container, and a composer-first approach happened years ago. Drupal 10 adds PHP 8.1+ requirements, drops old dependencies, and has CKEditor 5 and Olivero as defaults. I show Drupal 10 through the lens of a PHP developer familiar with Magento 2 and Symfony.

(more…)

Laravel vs Symfony – DI, Doctrine vs Eloquent, when to choose which

  • 0
Henryk Tews
Tuesday, 14 March 2023 / Published in Laravel, PHP, Symfony

Laravel and Symfony are the two dominant PHP frameworks, and choosing between them is a real decision in every new project. They share a Symfony core (Laravel uses several Symfony components) but have fundamentally different philosophies: Symfony favours explicitness and flexibility, Laravel favours convention and developer ergonomics. I compare them where it matters most for a PHP developer making an architecture choice.

(more…)

Magento 2 performance – OPcache, Redis, N+1 queries, Blackfire, priority table

  • 0
Henryk Tews
Tuesday, 14 February 2023 / Published in Magento / Adobe Commerce

Magento 2 performance is a broad topic, but the high-impact improvements follow a clear priority order. OPcache configuration is free and immediate. Redis correctly configured reduces PHP cycles. N+1 queries are the single biggest source of slowness in custom code. Blackfire makes the invisible visible. I show a prioritised approach with concrete configurations and code examples.

(more…)

TypeScript for the PHP developer – types, interfaces, generics, async/await

  • 0
Henryk Tews
Tuesday, 10 January 2023 / Published in JavaScript

TypeScript is to JavaScript what strict_types + PHPStan is to PHP – it adds a type system on top of a dynamically typed language and catches errors before runtime. For a PHP developer the concepts are familiar: interfaces, generics, union types. I show the most important TypeScript features from the perspective of someone who thinks in typed PHP daily.

(more…)

PHP 8.2 – readonly classes in practice, deprecations, Rector, migration checklist

  • 0
Henryk Tews
Tuesday, 13 December 2022 / Published in PHP

PHP 8.2 was officially released on 8 December 2022. A month of using readonly classes in new modules and patching dynamic properties in older code gives a clear practical picture. I show what readonly classes look like in real Magento 2 code, the most common dynamic property violations and how to fix them with Rector, and a migration checklist for upgrading existing projects.

(more…)

Template Method – algorithm skeleton, hooks, abstract vs hook, comparison with Strategy

  • 0
Henryk Tews
Tuesday, 08 November 2022 / Published in Wzorce projektowe

Template Method defines the skeleton of an algorithm in a base class and lets subclasses fill in specific steps. It is the backbone of inheritance-based extensibility – and one of the most widely used patterns in frameworks like Magento 2, Symfony and Laravel. I show the classic GoF implementation, the difference between abstract steps and hooks, and a comparison with Strategy.

(more…)

MSI – Source, Stock, SSA, custom algorithm, migrating from legacy API

  • 0
Henryk Tews
Tuesday, 11 October 2022 / Published in Magento / Adobe Commerce

Multi Source Inventory replaced the old single-stock Magento inventory system. MSI introduces Sources (physical locations), Stocks (virtual aggregations), and Source Selection Algorithms (how to fulfil orders). Most shops use only default configurations, but once you have multiple warehouses or need custom fulfilment logic, MSI requires deep understanding. I show the architecture and how to write a custom SSA.

(more…)

  • 12
  • 13
  • 14
  • 15
  • 16

© 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}