Skip to content

[TypeDeclaration] Deprecate ParamTypeByMethodCallTypeRector and its split Object/Scalar/Array rules - #8567

Merged
TomasVotruba merged 3 commits into
mainfrom
tv-deprecate-param-type-by-method-call
Oct 9, 2026
Merged

TomasVotruba merged 3 commits into
mainfrom
tv-deprecate-param-type-by-method-call

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Deprecates ParamTypeByMethodCallTypeRector and the Object/Scalar/Array rules split out of it in #8134.

These rules infer a param type from a single caller argument and fill it in as a native type. That is risky: it can fill invalid types and cause type errors on controllers and other input-call methods, where the real accepted type is wider than one observed caller. Inferring types this way is unreliable and needs human verification, so it better suits static analysis than an automated code change.

Each rule now implements DeprecatedInterface, its refactor() throws with a deprecation message, and all four are removed from the TypeDeclaration level. Tests and the shared engine body are dropped.

@TomasVotruba
TomasVotruba force-pushed the tv-deprecate-param-type-by-method-call branch from 4b26eb2 to b9e3367 Compare October 9, 2026 17:33
@TomasVotruba
TomasVotruba marked this pull request as ready for review October 9, 2026 18:10
@TomasVotruba
TomasVotruba merged commit 7007c99 into main Oct 9, 2026
50 checks passed
@TomasVotruba
TomasVotruba deleted the tv-deprecate-param-type-by-method-call branch October 9, 2026 18:11
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.

2 participants