Skip to content

[Transform] Deprecate ConstFetchToClassConstFetchRector as niche and never used - #8771

Merged
TomasVotruba merged 2 commits into
mainfrom
tv-deprecate-const-fetch-to-class-const-fetch
Oct 22, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
tv-deprecate-const-fetch-to-class-const-fetch

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Deprecates ConstFetchToClassConstFetchRector.

A global constant name can be reused across unrelated contexts and does not map cleanly to a single class constant, so this rule is too niche and was never used in practice. Use a custom rule scoped to the exact case instead.

Follows the same deprecation shape as #8767 and the ScalarValueToConstFetchRector deprecation: marks the class @deprecated + DeprecatedInterface, guts refactor() to throw, and drops the rule tests. The rule is configurable and registered in no set, so nothing else needs unregistering.

@TomasVotruba
TomasVotruba merged commit 5cb4bc5 into main Oct 22, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-deprecate-const-fetch-to-class-const-fetch branch October 22, 2026 11:40
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