PHP / Magento Dev Blog

  • Home

DDEV – local Magento 2 in 10 minutes, comparison with XAMPP

  • 0
Henryk Tews
Tuesday, 11 December 2018 / Published in Środowiska

For years, setting up a local Magento 2 environment was a ritual of pain: XAMPP with manual vhost configuration, fighting PHP versions, unreproducible “works on my machine” problems. DDEV solves this elegantly – Docker underneath, simple YAML configuration on top.

(more…)

Sorting in PHP – bubble sort, merge sort, usort() and the spaceship operator <=>

  • 0
Henryk Tews
Tuesday, 13 November 2018 / Published in Algorytmy

Sorting is a topic most of us “tick off” at university and only return to during job interviews. Yet understanding how sorting algorithms work helps make better decisions in everyday PHP and database work. I walk through a few classic approaches, implement them in PHP, and show where this has real practical relevance.

(more…)

Strategy pattern in PHP – and how Magento 2 uses it in pricing

  • 0
Henryk Tews
Tuesday, 09 October 2018 / Published in Magento / Adobe Commerce

Strategy is one of those patterns that seems like unnecessary complexity on first contact. Why wrap a single algorithm in a separate class? The value only becomes clear with a second and third algorithm – when instead of a growing if-else you have clean, interchangeable code. I show how it works in PHP and where Magento 2 uses this pattern without you realising it.

(more…)

Plugin vs Preference in Magento 2 – when to use which

  • 0
Henryk Tews
Tuesday, 11 September 2018 / Published in Magento / Adobe Commerce

One of the most common questions when working with Magento 2 is: should I override a class with a preference, or use a plugin? The answer is almost always the same – use a plugin. But “almost” does a lot of work here. I explain the differences and show when a preference makes sense.

(more…)

Xdebug – configuration, PHPStorm, debugging Magento plugins

  • 0
Henryk Tews
Sunday, 12 August 2018 / Published in Magento / Adobe Commerce

Everyone starts with var_dump() and die(). But after a few years working with PHP and Magento 2, those methods start to hurt – especially when debugging a complex order flow with dozens of plugins. I show how to set up Xdebug and why it is worth doing once, properly.

(more…)

PHP 7.2 – object type hint, sodium instead of mcrypt, deprecations

  • 0
Henryk Tews
Monday, 09 July 2018 / Published in PHP

PHP 7.2 was released in November 2017, but in practice many projects are only migrating to this version now. If you are still on 7.0 or 7.1 – this post is for you. I go through the most important changes that have a real impact on everyday code.

(more…)

  • 18
  • 19
  • 20

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