Skip to content

Infer parameters of closures in array arguments - #6417

Closed
canvural wants to merge 2 commits into
phpstan:2.2.xfrom
canvural:infer-nested-closure-parameters-from-array-arguments
Closed

Infer parameters of closures in array arguments#6417
canvural wants to merge 2 commits into
phpstan:2.2.xfrom
canvural:infer-nested-closure-parameters-from-array-arguments

Conversation

@canvural

Copy link
Copy Markdown
Contributor

Tried to take a stab at phpstan/phpstan#6430 myself, but failed 😄 So Claude helped me with this one. Also found another open issue that is duplicate.

Cannot say I understand the diff, but it seems small enough and it works.

Closes phpstan/phpstan#6430
Closes phpstan/phpstan#11215

@canvural
canvural force-pushed the infer-nested-closure-parameters-from-array-arguments branch from eb0ff99 to 7d4102f Compare September 11, 2026 11:41
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you for bringing this to my attention :) I tried the same on 2.3.x and it's a bit easier there, the single-pass rewrite (#5857) solves some similar issues around closures.

So here's my PR #6422, I hope you don't mind if I merge it instead :) PHPStan 2.3.0 should be out next week, or the week after that.

@canvural
canvural deleted the infer-nested-closure-parameters-from-array-arguments branch September 11, 2026 21:51
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.

2 participants