PHP ... old fashioned Blog (Page 1)

Stop reading every line of code

A developer inspects a tiny trust-budget slice while PHPStan, Infection, and CI robots handle the larger share in front of a mountain of code diffs.

AI made code cheap. Trust is not. The old review ritual still pretends a careful human can keep up by reading harder. Then a green test suite lies to you, a 32k-line PR asks for a blessing, and a professional-looking diff hides the real risk. Quality was never living in the scroll bar. The real question is why the system should trust the change at all when attention runs out.

Contract-first API testing: How your OpenAPI spec becomes the test suite

Diagram showing how an OpenAPI spec feeds into automated test layers that guarantee schema compliance, auth enforcement, and documentation governance

Most teams treat OpenAPI as documentation. This experiment treats it as an executable contract. Every endpoint, every response, every error is validated against the spec automatically. This post explains the testing concept, the metadata system, and the CI pipeline behind it.

Categories: PHP Learnings Tech Trends

Deadlock-free product indexing in Shopware 6 with a dedicated messenger transport

Running multiple Shopware message workers during indexing causes deadlocks on the product table. This guide explains why, walks through the pitfalls of Symfony Messenger routing, and shows how to configure a dedicated indexer transport consumed by a single worker.

Local devenv set up - Shopware 6

Local devenv set up - Shopware 6

This blog post is mainly a reference for myself. So that I don't always have to search for commands and places where I need to change something. Basically it shows the steps to set up a new instance with devenv and Shopware 6. It also shows how to enable xdebug if needed. And how to use an SSL certificate and what needs to be changed.

Categories: Shopware 6 PHP

OpenAPI Specification or the most underrated feature

OpenAPI Specification or the most underrated feature

How would we work without an API? If you were debugging something right now, you would surely say "much better" 😉 But let's face it, without an API, the modern e-commerce world wouldn't work at all. And what do we do to make sure our API works the way we expect it to? How do we test our API? How do we validate our schema?

Categories: JavaScript Shopware 6 PHP

PHP-Snippet: How to get the defaultTaxRate in Shopware 6?

Sometimes it is maybe useful to get the defaultTaxRate that is defined via Admin in Shopware 6. For this we have this small php function below to get the UUID from the SystemConfig and then search with the tax.repository to get the curent value. The system path to get the default UUID is core.tax.defaultTaxRate.

Categories: Shopware 6 PHP

PHPStan with static SQL analysis as pre-commit hook for Shopware 6

PHPStan with static SQL analysis as pre-commit hook for Shopware 6

You working on a customer project and you want to make sure that you write code like a Shopware 6 core developer? Then you need all the shiny linters that the core developers are using. This guide will explain how to setup PHPStan and easy-coding-standard as a pre-commit hook with CaptainHook in a docker container setup. That's it, enjoy. 🤯

Categories: Shopware 6 PHP