Search by

actra / coding-standard

JayQ1982

Coding standard of Actra AG: rules for developers and AI assistants, strict PHPStan and PHP-CS-Fixer configuration.

Package info

github.com/Actra-AG/coding-standard

pkg:composer/actra/coding-standard

Statistics

Installs: 76

Dependents: 4

Suggesters: 0

Stars: 0

Open Issues: 0

v1.27.0 2026-10-11 16:00 UTC

README

Shared coding standard for all PHP projects and libraries of Actra AG, for developers and AI assistants. It builds on PSR and PER Coding Style, adds stricter rules for types, security and testing, and enforces them with a shared PHPStan (level 10, strict) and PHP-CS-Fixer configuration.

This repository is public: rules only, never project data, credentials, hostnames or customer names.

Contents

Usage

  1. Install it (brings PHPStan with extensions and PHP-CS-Fixer):
    composer require --dev actra/coding-standard
  2. Copy the files from templates/ into the project root and adapt them (project part of AGENTS.md, license in the header of .php-cs-fixer.dist.php). The npm files only for projects with own CSS or JavaScript (html-javascript.md, section 4).
  3. Add the Composer scripts from tooling.md and make composer check green (PHPStan baseline for legacy code). Projects with request and session objects also include phpstan-no-superglobals.neon.
  4. Remove rules from the project documentation that are already covered here.

Update with composer update actra/coding-standard after reading UPGRADE.md.

Changing the standard

Pull requests with a short reason per rule; only rules that apply to every Actra project (see versioning.md and git.md).

License

MIT