Skip to content

Fix NullToStrictStringFuncCallArgRector with probabilistic check for plural array passed to function where array allowed#7539

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-fix-call-args-string-cast
Oct 22, 2025
Merged

Fix NullToStrictStringFuncCallArgRector with probabilistic check for plural array passed to function where array allowed#7539
TomasVotruba merged 1 commit into
mainfrom
tv-fix-call-args-string-cast

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented Oct 22, 2025

Closes rectorphp/rector#9447

Since this is 1st time mixed variable is incorrectly casted to string as array, I've added only simple check for possible plural variable. That allows this rule to catch array mixed, while keeps working for string mixed.

If it fails, we'll revisit 👍

…plural array passed to function where array allowed
@TomasVotruba TomasVotruba force-pushed the tv-fix-call-args-string-cast branch from e88bb32 to 70e8952 Compare October 22, 2025 15:25
@TomasVotruba TomasVotruba merged commit 97d84eb into main Oct 22, 2025
52 checks passed
@TomasVotruba TomasVotruba deleted the tv-fix-call-args-string-cast branch October 22, 2025 15:30
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector casts array to string

1 participant