From c33d3cd2b1c63c13074bce87214403b0abe3d5fa Mon Sep 17 00:00:00 2001 From: turegjorup Date: Fri, 5 Jun 2026 10:14:29 +0200 Subject: [PATCH] chore(phpstan): require comments on inline @phpstan-ignore annotations Enable reportIgnoresWithoutComments so every inline suppression documents why it is safe to ignore. No existing inline ignores in src/ or migrations/, so the analysis stays green. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 3 +++ phpstan.dist.neon | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aba4b7a67..184fe1c49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Enabled PHPStan's `reportIgnoresWithoutComments`: inline `@phpstan-ignore` annotations must + carry a comment explaining the suppression. + ## [3.0.0-rc4] - 2026-06-04 - Tuned OPcache in the production image: enabled Symfony class preloading, inlined container diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 02dc05424..884a0a5f7 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -3,6 +3,8 @@ includes: parameters: level: 6 + # Inline `@phpstan-ignore` annotations must carry a `(comment)` explaining the suppression. + reportIgnoresWithoutComments: true paths: - src/ - migrations/