PHP / Magento Dev Blog

  • Publikacje
  • O autorze
  • Kontakt

REST API – resources vs actions, HTTP codes, response structure, versioning

  • 0
Henryk Tews
Tuesday, 09 February 2021 / Published in PHP

REST API design is one of those topics where everyone has an opinion but few have a consistent set of rules. Resources vs actions, the right HTTP status codes, response structure, versioning – decisions made here stay with the API for years. I show the principles I follow when designing REST APIs in PHP projects and Magento 2 modules.

(more…)

PHPUnit – unit tests, mocks, data providers, testing in Magento 2

  • 0
Henryk Tews
Tuesday, 12 January 2021 / Published in PHP

Unit testing in PHP projects is a topic most developers know in theory but keep putting off until “when there is time”. The time never comes. I show how to get started with PHPUnit, how to write tests that actually check something meaningful, and how to mock dependencies – with examples that look like real production code.

(more…)

Symfony components without the framework – Console, Validator, HttpClient

  • 0
Henryk Tews
Tuesday, 08 December 2020 / Published in PHP, Symfony

Symfony is not just a framework – it is a set of independent PHP components you can use separately in any project. Magento 2 itself uses them (Console, Filesystem, Serializer). I show a few components that genuinely help in everyday PHP and Magento work: Console for writing CLI commands, Validator for validating data, and HttpClient for communicating with external APIs.

(more…)

PHP 8.0 – release and first impressions of the new features

  • 0
Henryk Tews
Thursday, 26 November 2020 / Published in PHP

PHP 8.0 was officially released on 26 November 2020. I wrote about the previews in July – now that I have the final version, it is time for first practical impressions. I check what works as promised, what surprised me, and what to watch out for when migrating older projects.

(more…)

Varnish – VCL, cache tagging, ESI, invalidation, DDEV setup

  • 0
Henryk Tews
Tuesday, 13 October 2020 / Published in Magento 2, Środowiska

Magento’s built-in Full Page Cache stores pages in files or Redis. It works, but it handles requests inside PHP – nginx and PHP-FPM still have to start for every request. Varnish sits in front of nginx and serves pages from memory without touching PHP. For a shop with traffic that is the difference between a second and milliseconds.

(more…)

Vue.js for the PHP developer – Options API, Composition API, Magento REST communication

  • 0
Henryk Tews
Tuesday, 08 September 2020 / Published in JavaScript

As a PHP developer you have probably had some contact with jQuery and maybe a bit of plain JS. Vue.js is the next step – a reactive framework that increasingly appears in e-commerce projects as a frontend layer for headless Magento or as a replacement for the older knockout.js. I show the basics from the perspective of someone who thinks in PHP day to day.

(more…)

Elasticsearch in Magento 2 – indexing, debugging queries, custom analyzer for Polish

  • 0
Henryk Tews
Tuesday, 11 August 2020 / Published in Magento 2

Since Magento 2.4 Elasticsearch is the only supported search engine – MySQL Search was removed. For many shops it “just works”, but when a client reports that “the search doesn’t find the right products”, the real work begins. I show how Magento indexes data in ES, how to debug queries, and how to extend the index with custom fields.

(more…)

PHP 8.0 preview – union types, named arguments, match, constructor promotion, JIT

  • 0
Henryk Tews
Tuesday, 14 July 2020 / Published in PHP

PHP 8.0 ma wyjść w listopadzie 2020 i będzie największą zmianą w języku od czasu PHP 7.0. JIT compiler, union types, named arguments, match expression, constructor property promotion – to nie są drobne poprawki. Przeglądam najważniejsze nowości na przykładach i oceniam co realne znaczenie dla codziennego kodu z Magento 2.

(more…)

Repository pattern – interface, implementation, SearchCriteria, testing with mock

  • 0
Henryk Tews
Tuesday, 09 June 2020 / Published in Wzorce projektowe

Repository is a pattern that separates business logic from the details of data access. Instead of scattering SQL queries or ORM calls throughout the application, you have one class responsible for fetching and saving entities. In Magento 2 Repository is part of Service Contracts – a standard, not an option. I show how to build your own Repository from scratch and why it is worth doing.

(more…)

Akeneo PIM – why a PIM, REST API, attribute mapping, cron import

  • 0
Henryk Tews
Tuesday, 12 May 2020 / Published in Magento 2, PIM

When a shop has several thousand products with dozens of attributes in several languages, managing product data directly in Magento becomes a real pain. Akeneo PIM solves this – it centralises product data and delivers it to Magento (and other channels) through an API. I show why you would want a PIM and what the technical integration looks like.

(more…)

  • 9
  • 10
  • 11
  • 12
  • 13

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