Skip to content

Add modern rule set grouping trait/reference/dynamic-name rules - #360

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-modern-rules-set
Oct 13, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-modern-rules-set

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Groups 5 rules that modern/legacy-heavy codebases violate in bulk into a dedicated modern set, so a project can enable or disable them with a single toggle instead of per-rule ignores.

Moved into new config/modern-rules.neon, gated by %symplify.modern%:

  • ForbiddenTraitRule (was in configurable)
  • ForbiddenExtendOfNonAbstractClassRule (was in static)
  • NoReferenceRule (was in static)
  • NoDynamicNameRule (was in complexity)
  • ForeachCeptionRule (was in complexity)

modern defaults to true, so default enforcement is unchanged. Projects flip symplify.modern: false to disable the whole group.

Registered in both symplify-rules.neon and composer.json extension includes; schema + README updated.

@TomasVotruba
TomasVotruba merged commit 461cae9 into main Oct 13, 2026
9 checks passed
@TomasVotruba
TomasVotruba deleted the tv-modern-rules-set branch October 13, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant