interaction-design-foundation/coding-standard
A shared PHP coding standard from Interaction Design Foundation for Laravel/PHP projects. It packages PHP_CodeSniffer rules so teams can enforce consistent style and catch common issues with minimal configuration, standardizing local and CI checks across apps and packages.
Config::create(__DIR__)), not just a config file to copy.composer require plus one line, rather than a forking exercise. That sharpens the decision: adopt-and-pin (fast, low effort, upstream's opinions), fork-and-own (control, maintenance burden), or assemble from PER-CS 3.0 + slevomat/coding-standard (most work, best fit).global_namespace_import, fixed class member ordering, snake_case test method names, single-quote strings, nowdoc conversions) are individually small but collectively touch nearly every file.php_unit_strict's assertEquals→assertSame rewrite was removed from the fixer and delegated to Rector because the blanket rewrite could break object/array comparisons. These are all "reduce the number of arguments and the blast radius" decisions — evidence the maintainer is optimizing for adoptability, which is exactly what you want from a standard you're considering inheriting.Adopt (or vendor/fork) it when:
^8.4 and PHP_CodeSniffer ^4.0. If you're on 8.2/8.3 with no upgrade scheduled, this release is not for you — full stop.composer cs). Teams that wanted "one formatter, done" should look at Pint instead.use function imports, enforced member ordering, aggressive PHPDoc cleanup that strips @author/@package/@since. Read the ruleset; a standard you disable rule-by-rule is no longer a standard.Config::create() and the slimmer ruleset, but keep the ability to fork. That remains the sane path given the maintenance profile.Look elsewhere when:
laravel preset gives you two competing sources of truth for the exact same tool. Pick one.slevomat/coding-standard.Before pinning: confirm the release cadence is real and that 1.0.0 has had a point release or two of follow-up. A first stable major with a breaking reorganization is the release most likely to have rough edges, and this one changes tool roles, PHP version, and PHPCS major simultaneously.
To executives: This is cheap developer-productivity infrastructure, not a product dependency. It encodes "how our PHP should look" as an automated check so style stops consuming human review time and new engineers stop guessing. The 1.0.0 release is meaningfully better than what we evaluated before: it's now a stable, semver-versioned 1.0, adopts the community PER-CS 3.0 formatting baseline instead of house invention, and made deliberate tradeoffs to reduce churn (softer line limits, no forced arrow functions, no risky test-assertion rewrites). The cost is a one-time reformat and a CI step; the return is less rework and faster reviews. Two constraints to be explicit about: it now requires PHP 8.4, so it's gated on our upgrade schedule, and it requires PHP_CodeSniffer 4.x, so it may force other tooling forward too. Risk stays low because the standard is configuration, not runtime code — it cannot break production — and because we can fork it in-house and own it.
To engineering: Treat it as a curated dependency with an escape hatch, not a permanent commitment. Read the ruleset, delete what we disagree with, wire it into CI as a non-blocking check first, then make it blocking for changed lines. Concretely: replace any hand-rolled PHP-CS-Fixer config with Config::create(__DIR__), keep <rule ref="IxDFCodingStandard"/> in phpcs.xml, and run composer cs (it chains fixer + phpcbf, so local and CI stay identical). Expect a large, mostly mechanical first diff — schedule it, don't spring it. Two hard rules: do not run this alongside Laravel Pint, and do not adopt unless we're on PHP 8.4. Watch the snake_case test-method rule (it diverges from PHPUnit convention) and the global_namespace_import rule (it adds use function lines everywhere). Before enabling the auto-commit workflow, get security/DevOps sign-off on bot commits to contributor branches. Success looks like: zero style comments in code review, and a .php-cs-fixer.php nobody has to argue about.
How can I help you explore Laravel packages today?