PHP ... old fashioned Blog (Page 2)

PHP posts around Shopware: PHPStan, devenv, FrankenPHP, indexing and contract-first API testing, plus older PHP resources.

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

Configure PHPStan in PHPStorm to use PHP from Docker Container

Configure PHPStan in PHPStorm to use PHP from Docker Container

In PHPStorm you can set up PHP > Quality Tools that will check your code as you code. This will help you write clean code. I suspect that most developers use a local configuration for these PHP > Quality Tools. But if you already have some Docker containers set up for your project, you should use the same PHP version and the same tool version, e.g. PHPStan, installed in this project via Composer. In this post I will guide you through the setup with many screenshots.

Categories: PHPStorm PHP

Testing php code for different php versions online

You can test your php code for different php version online.

Categories: PHP

PHP Resources

An unsorted list of useful PHP resources collected over time.

Categories: PHP