Skip to content

[Naming] Deprecate RenamePropertyToMatchTypeRector - #8547

Merged
TomasVotruba merged 1 commit into
mainfrom
deprecate-rename-property-to-match-type
Oct 8, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
deprecate-rename-property-to-match-type

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Deprecate RenamePropertyToMatchTypeRector.

Renaming properties to match their type is risky - it can conflict with existing names and strip custom naming that carries more context than the type alone.

The rule now implements DeprecatedInterface and throws on invocation. Tests, the naming set registration, and the now-dead internal services it drove (MatchTypePropertyRenamer, MatchPropertyTypeConflictingNameGuard, MatchPropertyTypeExpectedNameResolver, PropertyRenameFactory, PropertyRenameGuard, DateTimeAtNamingConventionGuard, HasMagicGetSetGuard, PropertyFetchRenamer, PropertyRename value object) are removed. PropertyPromotionRenamer is trimmed to renameParamDoc(), still used by the PHP 8.0 promotion rule.

@TomasVotruba
TomasVotruba merged commit dc5ec41 into main Oct 8, 2026
50 checks passed
@TomasVotruba
TomasVotruba deleted the deprecate-rename-property-to-match-type branch October 8, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant