Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @alies-dev

@samsonasik samsonasik changed the title [Php81][CodingStyle] Skip multi param on FunctionLikeToFirstClassCallableRector [Php81][CodingStyle] Skip multi params on FunctionLikeToFirstClassCallableRector Oct 22, 2025
@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik enabled auto-merge (squash) October 22, 2025 13:15
@samsonasik samsonasik merged commit 3c75872 into main Oct 22, 2025
52 checks passed
@samsonasik samsonasik deleted the skip-multi-params branch October 22, 2025 13:15
@calebdw
Copy link
Contributor

calebdw commented Oct 22, 2025

This is incorrect, if you're going to skip based on the number of params then it needs to be dynamic (not just more than 1) based on the number of params in the original closure and the number/type of params in the receiving method signature

@samsonasik
Copy link
Member Author

@calebdw we only check args is 1, so the param on caller target should be 1 as well so it is on mirror.

Feel free to provide alternative PR tho :)

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.

FunctionLikeToFirstClassCallableRector: Type Mismatch in First-Class Callable Conversion

3 participants