gruff-php 0.4.1 - rule-rubric precision, enum-candidate retired, src namespace consolidation
Headline
0.4.1 focuses on rule-rubric precision: fewer false positives and fewer over-severe findings without disabling the rules that catch real maintainability problems.
Highlights
- BREAKING: Removed
modernisation.enum-candidate- Constant-only classes are no longer pushed toward enums. - Tighter rubrics (docs/naming/size/complexity/modernisation/dead-code) - Fewer false positives and over-severe findings; real waste still reports.
- Constant PHPDoc is configurable -
docs.missing-constant-phpdocaccepts local comments by default; require strict API PHPDoc viarequirePhpdocForApiConstants/apiPathPatterns. reportrejects unknown rule filters ---include-rule/--exclude-ruletypos fail fast (exit 2) up front, likeanalyse.- Namespace consolidation -
src/reorganised into six packages; public contracts unchanged, only direct internal imports change (GruffPhp\Rule\→Rules\).
Upgrade
composer require --dev blundergoat/gruff-php:^0.4
vendor/bin/gruff-php --version # gruff-php 0.4.1Resetting gruff-php.yaml is required since a rubric was removed.
vendor/bin/gruff-php init --force