PHP / Magento Dev Blog

  • Publikacje
  • O autorze
  • Kontakt

Kubernetes for the PHP developer – kubectl debugging, Deployment YAML, HPA, troubleshooting

  • 0
Henryk Tews
Friday, 21 March 2025 / Published in Środowiska

Most PHP applications eventually run on Kubernetes – but developers rarely touch it until something breaks in production. Understanding the basics of Deployments, Services, ConfigMaps, and HPA makes debugging much faster. I show the minimum Kubernetes knowledge a PHP/Magento developer needs: reading logs, exec into pods, understanding why a pod is crashing, and writing a sensible Deployment YAML.

(more…)

Specification pattern – encapsulating business rules, AND/OR/NOT composition, testing

  • 0
Henryk Tews
Tuesday, 04 March 2025 / Published in Wzorce projektowe

Specification is a pattern that encapsulates a business rule as a composable object. Instead of scattering if-else checks throughout the codebase, you name the rule, make it testable, and combine it with AND, OR, NOT. I show a PHP implementation with composition operators and apply it to product eligibility rules in Magento 2.

(more…)

100th post – retrospective: 6.5 years, PHP 7.2 to 8.4, Magento 2.2 to 2.4.8

  • 0
Henryk Tews
Tuesday, 18 February 2025 / Published in Magento 2, PHP

This is the 100th post on this blog. I started writing in July 2018, documenting what I was learning and building. 6.5 years, PHP 7.2 through 8.4, Magento 2.2 through 2.4.8, 100 posts. A retrospective – what changed, what stayed the same, and what I would tell myself in 2018 if I could.

(more…)

PHP 8.5 RFCs – pipe operator, readonly inheritance, why generics are not coming yet

  • 0
Henryk Tews
Tuesday, 04 February 2025 / Published in PHP

PHP 8.5 RFCs are actively being discussed on the php.net internals list. The pipe operator proposal has been debated for years and may finally ship. Readonly property inheritance fixes an inconsistency. Generics are discussed but will not come in 8.5. I look at the most impactful proposals, show what the code would look like, and explain why generics remain out of reach in the short term.

(more…)

Custom indexer – mview.xml, flat table, full and partial reindex, cron-triggered

  • 0
Henryk Tews
Tuesday, 21 January 2025 / Published in Magento 2

Magento 2 indexers maintain denormalised data structures – flat tables, price indexes, category-product mappings – that make frontend queries fast. The built-in indexers cover most needs, but complex custom features sometimes need their own. I show how to build a custom indexer from scratch: mview.xml for change tracking, the indexer class with full and partial reindex, and triggering via cron.

(more…)

PHP / Magento trends 2025 – FrankenPHP, AI tooling update, OpenSearch, Hyvä consolidation

  • 0
Henryk Tews
Tuesday, 07 January 2025 / Published in PHP

2025 is shaping up as a year of consolidation in the PHP ecosystem. FrankenPHP changes how PHP applications are deployed. AI tooling has matured from “experimental toy” to “daily assistant”. OpenSearch has fully replaced Elasticsearch in the Magento ecosystem. Hyvä has become the default frontend choice. I review where things stand and what is worth learning in the next twelve months.

(more…)

Magento 2.4.8 – PHP 8.4 support, Elasticsearch to OpenSearch migration, upgrade checklist

  • 0
Henryk Tews
Tuesday, 31 December 2024 / Published in Magento 2

Magento 2.4.8 was released in April 2025 and is the most significant update in the 2.4.x line. PHP 8.4 support, dropping official Elasticsearch support in favour of OpenSearch, and a long list of dependency updates make this a mandatory upgrade for projects that want to stay on supported software. I show what actually changes and provide a practical upgrade checklist.

(more…)

LRU Cache – O(1) implementation with HashMap and doubly linked list, per-request cache

  • 0
Henryk Tews
Tuesday, 17 December 2024 / Published in Algorytmy

LRU Cache (Least Recently Used) is the caching strategy where the item accessed longest ago is evicted when the cache is full. The naive O(n) implementation is too slow for tight loops. A proper O(1) implementation requires combining a doubly linked list (access order) with a hash map (O(1) lookup). I implement it from scratch in PHP and show how it maps to the per-request in-memory cache pattern used in Magento 2.

(more…)

Redis Streams – Consumer Groups, pending messages, dead letter, Magento queue integration

  • 0
Henryk Tews
Tuesday, 03 December 2024 / Published in Magento 2

Redis Streams is a data structure added in Redis 5.0 that combines the simplicity of a log with consumer groups and acknowledgement semantics. For Magento 2 it offers a robust alternative to RabbitMQ for message queuing: persistent messages, consumer groups, pending message redelivery, and dead letter handling – without the operational overhead of a dedicated AMQP broker.

(more…)

PHP 8.4 release – property hooks in production, asymmetric visibility, BcMath\Number, array_find

  • 0
Henryk Tews
Tuesday, 26 November 2024 / Published in PHP

PHP 8.4 was officially released on 21 November 2024. After the RC months I had code ready to merge the day it went stable. A month in production gives me a clear picture of what property hooks look like in real module code, where asymmetric visibility is actually useful versus where it is overkill, and how BcMath\Number compares to the traditional bcmath functions in practice.

(more…)

  • 2
  • 3
  • 4
  • 5
  • 6

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