PHP ... old fashioned Blog (Page 1)

Local devenv set up - Shopware 6

Cover image for 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

Cover image for 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

Cover image for 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

Cover image for 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

Unsortierte Liste zu guten PHP Ressourcen welche im Laufe der Zeit gefunden wurden.

Categories: PHP