You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 80d6e8e
Browse filesBrowse the repository at this point in the historyBrowse files
Allow rules to be enabled and disabled individually
Add `phpunit.allRules` and one parameter per rule, following the
convention established by phpstan/phpstan-strict-rules. All rules in
rules.neon are now services tagged through conditionalTags, so
`allRules: false` disables every rule and single rules can be turned
back on by name.
Default behaviour is unchanged: the Bleeding Edge and
strictRulesInstalled conditions moved into the parameter defaults.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ stubs/ # PHPUnit stub files for type definitions
72
72
## Configuration Files
73
73
74
74
-**`extension.neon`** — Main extension configuration registered via phpstan/extension-installer. Defines parameters, services (type extensions, helpers), and stub files.
75
-
-**`rules.neon`** — Strict PHPUnit-specific rules. Loaded separately; users opt in by including this file.
75
+
-**`rules.neon`** — Strict PHPUnit-specific rules. Loaded separately; users opt in by including this file. Every rule is registered as a service and tagged through `conditionalTags` with its own `phpunit.<ruleName>` parameter (defined in `extension.neon`, defaulting to `%phpunit.allRules%`). A new rule needs a service, a conditional tag, a parameter, a schema entry and a README table row; `RuleTogglesTest` fails if the toggle is missing.
76
76
-**`phpstan.neon`** — Self-analysis configuration (level 8, with strict rules and deprecation rules).
77
77
-**`phpstan-baseline.neon`** — Baseline for known PHPStan errors in the project itself.
78
78
-**`phpunit.xml`** — PHPUnit configuration for running the test suite.
|`dataProviderData`|`DataProviderDataRule`| with [Bleeding Edge](https://phpstan.org/blog/what-is-bleeding-edge)|
144
+
|`classAttributeRequiresPhpVersion`|`ClassAttributeRequiresPhpVersionRule`| with Bleeding Edge |
145
+
|`emptyDataProvider`|`EmptyDataProviderRule`| with Bleeding Edge |
146
+
|`assertEqualsIsDiscouraged`|`AssertEqualsIsDiscouragedRule`| with Bleeding Edge and [phpstan-strict-rules](https://github.com/phpstan/phpstan-strict-rules)|
147
+
|`assertEmptyIsDiscouraged`|`AssertEmptyIsDiscouragedRule`| with Bleeding Edge and phpstan-strict-rules |
148
+
149
+
Setting a parameter to `true` enables the rule regardless of Bleeding Edge and phpstan-strict-rules.
0 commit comments