PHP / Magento Dev Blog

  • Home

Custom shipping carrier – collectRates, package tracking, label generation

  • 0
Henryk Tews
Tuesday, 16 July 2024 / Published in Magento / Adobe Commerce

A custom shipping carrier in Magento 2 goes beyond just returning rates – full implementations include package tracking, label generation, and webhook handling for status updates. I show the complete implementation from collectRates through tracking requests to PDF label generation, using a fictional carrier API to demonstrate all the integration points.

(more…)

PHP 8.4 RC – property hooks in practice, surprises, asymmetric visibility

  • 0
Henryk Tews
Tuesday, 02 July 2024 / Published in PHP

PHP 8.4 RC is out and the final release is coming in November 2024. Property hooks looked great on paper – after a month with RC builds on real code I can report what works exactly as expected, where the syntax surprises you, and what limitations matter in practice. Asymmetric visibility also has a few edge cases worth knowing before the feature goes stable.

(more…)

Memento pattern – undo/redo, price history, DB persistence as audit log

  • 0
Henryk Tews
Tuesday, 18 June 2024 / Published in Wzorce projektowe

Memento is a behavioural pattern that captures and restores an object’s internal state without violating encapsulation. It is the foundation of undo/redo, version history, and audit logs. I show the classic GoF implementation, a practical price history tracker for Magento, and a database-persisted version that doubles as an audit log.

(more…)

Blackfire – DDEV setup, HTTP and CLI profiling, CI/CD assertions

  • 0
Henryk Tews
Monday, 03 June 2024 / Published in PHP, Środowiska

Blackfire is a PHP profiler that shows not just what is slow, but why – with call graphs, timeline, and SQL query analysis. Unlike Xdebug which shows you line-level execution, Blackfire aggregates and visualises the performance bottlenecks in a way that makes them immediately actionable. I show installation in DDEV, profiling HTTP requests and CLI commands, and writing performance assertions for CI/CD.

(more…)

Magento B2B – Company, Shared Catalog, Negotiable Quote, custom plugins

  • 0
Henryk Tews
Tuesday, 21 May 2024 / Published in Magento / Adobe Commerce

Magento B2B is a separate module suite for business-to-business selling. Company accounts, Shared Catalogs with customer-specific pricing, Negotiable Quotes, and Requisition Lists are the core features. I show the architecture, how each feature connects to the core Magento data model, and how to extend them with custom plugins.

(more…)

CQRS – Command Bus, Query Bus, read models, Magento 2 integration

  • 0
Henryk Tews
Tuesday, 07 May 2024 / Published in Wzorce projektowe

CQRS (Command Query Responsibility Segregation) is an architectural pattern that separates write operations (Commands) from read operations (Queries). This separation enables independent optimisation of reads and writes, event sourcing, and eventually consistent read models. I show an implementation with CommandBus and QueryBus, apply it to a Magento 2 module, and explain when the added complexity is justified.

(more…)

Trie – prefix tree, autocomplete, spam filter, benchmark vs array

  • 0
Henryk Tews
Tuesday, 16 April 2024 / Published in Algorytmy

A Trie (prefix tree) is a data structure that stores strings in a tree where each node represents a character. It is the foundation of autocomplete, spell-check, and IP routing. PHP arrays can implement the same functionality but at very different performance characteristics. I implement a Trie from scratch and benchmark it against array-based approaches.

(more…)

AI tools for the PHP developer – Copilot, Claude, Ollama, where it helps and where it fails

  • 0
Henryk Tews
Tuesday, 02 April 2024 / Published in PHP

AI coding assistants moved from novelty to daily tool in the span of a year. After using GitHub Copilot, Claude, and local models via Ollama for several months across PHP and Magento projects, I have a clear picture of where they genuinely save time and where they confidently generate plausible-looking wrong code. This is an honest assessment, not a marketing piece.

(more…)

REST API security – tokens, ACL, nginx rate limiting, monitoring suspicious requests

  • 0
Henryk Tews
Tuesday, 19 March 2024 / Published in Magento / Adobe Commerce

Magento 2 REST API is powerful but exposed to abuse if not properly secured. Default token authentication, over-permissive ACL resources, no rate limiting, and logging gaps are the most common issues I see on production installations. I show a layered security approach: proper token management, granular ACL, nginx rate limiting, and monitoring for suspicious patterns.

(more…)

ReactPHP – event loop, parallel HTTP requests, HTTP server, Fibers bridge

  • 0
Henryk Tews
Tuesday, 05 March 2024 / Published in PHP

ReactPHP is a library for event-driven, non-blocking I/O in PHP. It brings the same model that made Node.js famous to the PHP world – a single-threaded event loop that handles multiple concurrent connections without threads. I show how to build a simple HTTP server, make parallel HTTP requests, and bridge between ReactPHP’s promise-based async and PHP 8.1’s Fibers.

(more…)

  • 10
  • 11
  • 12
  • 13
  • 14

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