PHP / Magento Dev Blog

  • Home

MSI – Multi Source Inventory: source selection algorithm, custom SSA

  • 0
Henryk Tews
Saturday, 30 May 2026 / Published in Magento / Adobe Commerce

Multi Source Inventory (MSI) is one of the largest refactorings in Magento 2 history – introduced in version 2.3. Instead of a single global stock state, products can have stock in multiple sources (warehouses, physical stores, dropshipping). The Source Selection Algorithm decides which source to fulfil the order from. I show the MSI architecture, how the default algorithm works, and how to write a custom one.

(more…)

Flyweight pattern – object sharing, instance cache, Magento 2

  • 0
Henryk Tews
Tuesday, 26 May 2026 / Published in Wzorce projektowe

Flyweight is a structural pattern that minimises memory usage by sharing as much data as possible between similar objects. Instead of creating thousands of objects with repeated data – you create one object and references to it. In Magento 2 this pattern appears in many places: translations, store configuration, EAV objects. I show an implementation from scratch and how to recognise it in existing code.

(more…)

Skip List – probabilistic data structure O(log n), PHP implementation

  • 0
Henryk Tews
Friday, 22 May 2026 / Published in Algorytmy

Skip List is a probabilistic data structure invented by William Pugh in 1990. It combines the simplicity of a singly linked list with the performance of a binary tree – search, insert and delete operations run in O(log n) on average, without the need for balancing like AVL or Red-Black Trees. Rarely used in PHP, but it illustrates perfectly how randomness can replace complex balancing algorithms.

(more…)

Git course #7 – debugging and rescue: bisect, reflog, reset vs revert

  • 0
Henryk Tews
Monday, 18 May 2026 / Published in Other

Every developer eventually breaks something in a repository. Good news: Git rarely loses data permanently – reflog records every HEAD change. Bisect cuts hours of regression hunting to minutes. Reset has three modes and mixing them up causes pain. Revert is the safe alternative on public branches. This post is the rescue map.

(more…)

Git course #6 – hooks and automation: pre-commit, PHPStan, commit-msg, DDEV

  • 0
Henryk Tews
Saturday, 16 May 2026 / Published in Other

Git hooks are scripts that run automatically on Git operations. A pre-commit hook run before every commit eliminates a class of errors before they enter history. Commit-msg enforces message conventions. Pre-push protects the remote branch from broken code. I show how to configure this in a Magento 2 project with DDEV.

(more…)

Git course #5 – team workflow: Git Flow, trunk-based, PR, code review

  • 0
Henryk Tews
Thursday, 14 May 2026 / Published in Other

The choice of Git workflow has a bigger impact on team productivity than most technical decisions. Git Flow, GitHub Flow, trunk-based development are complete models for work, code review, and deployment. I show when to use each and what separates a good pull request from a bad one.

(more…)

Git course #4 – remote work: remote, fetch vs pull, force-with-lease

  • 0
Henryk Tews
Tuesday, 12 May 2026 / Published in Other

Working with remotes is everyday work in every team – but many people only use git pull and have a vague idea of what actually happens. Tracking refs, the difference between fetch and pull, when to use --force-with-lease instead of --force, and how remote branches actually work is knowledge that saves you from irreversible mistakes.

(more…)

Git course #3 – branching and merge: strategies, conflicts, fast-forward

  • 0
Henryk Tews
Sunday, 10 May 2026 / Published in Other

The question “merge or rebase?” is one of the most common in Git-using teams. Both strategies achieve the same result – integrating changes – but produce completely different history. There is no single right answer, there is context. I show when to use each, how conflicts work, and why fast-forward is not the same as “no merge commit”.

(more…)

Git course #2 – commits and history: rebase -i, cherry-pick, bisect

  • 0
Henryk Tews
Friday, 08 May 2026 / Published in Other

Commit history is project documentation – other developers read it, git bisect searches it for bugs, and git blame explains decisions. Good commit messages, the ability to tidy history before a merge, and knowing cherry-pick and bisect are tools that separate someone who “uses Git” from someone who “manages” it.

(more…)

Git course #1 – data model: blobs, trees, commits, refs

  • 0
Henryk Tews
Wednesday, 06 May 2026 / Published in Git

Most developers use Git like a magic box: you type something, something gets saved, history somehow works. Until something goes wrong. To stop Git being a black box – start by understanding what actually lives inside the .git/ directory. Four object types: blob, tree, commit, tag. That is it. Everything else follows from these.

(more…)

  • 3
  • 4
  • 5
  • 6
  • 7

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