Php

TL;DR

There are two main approaches to using modern PHP: like Ruby, or like Java. We prefer the Java way: less magic, more types.

We strive to minimize magic and help IDE and static code analyzers to help us.

We use PSR-12 extended by other rules (mostly by powerful Slevomat Coding Standard). Additionally, we like Spatie’s code guidelines and borrow some rules from them.

We generally observe the standards from the PHP FIG. We use automated tools to check our code on CI:

Our codebase has some legacy code that does not fully follow our standards; please treat this document as the main source of truth. Main legacy parts:

  • Setters. We SHOULD use domain-specific methods to change a model’s state.
Copyright © 2026