Skip to content

Use argument types as parameter types for inline closures when assigned #3554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Oct 8, 2024

The functionality was introduced in #1628. It works. But as soon as you use an inline assign expression it breaks. Let's support this case too.

Sometimes, you want to call something inline and also use the callback later.

@ruudk ruudk changed the base branch from 2.0.x to 1.12.x October 8, 2024 17:30
The functionality was introduced in phpstan#1628. It works. But as soon as you use an inline assign
expression it breaks. Let's support this case too.

Sometimes, you want to call something inline and also use the callback later.
@ruudk ruudk force-pushed the closure-arg-visitor branch from ea45142 to 87412c6 Compare October 8, 2024 17:31
@ruudk
Copy link
Contributor Author

ruudk commented Oct 8, 2024

@ondrejmirtes This one is ready for review.

I don't understand the failing tests related to the issues. It complains that it cannot find level10.neon.

@ondrejmirtes ondrejmirtes merged commit ce3ffbd into phpstan:1.12.x Oct 9, 2024
474 of 500 checks passed
@ondrejmirtes
Copy link
Member

@ruudk We can't do much about that. Those issues were created with 2.0.x playground on level 10 but here we are in 1.12.x

@ondrejmirtes
Copy link
Member

Thank you!

@ruudk ruudk deleted the closure-arg-visitor branch October 9, 2024 09:24
@ondrejmirtes
Copy link
Member

Solved #3568

ruudk added a commit to ruudk/Twig that referenced this pull request Oct 17, 2024
After phpstan/phpstan-src#3554 this now makes it easier for PHPStan to
understands what's going on.

This will allow TwigStan to handle for loops in v4.
fabpot added a commit to twigphp/Twig that referenced this pull request Oct 18, 2024
This PR was merged into the 4.x branch.

Discussion
----------

Call For recurseFunc inline

After phpstan/phpstan-src#3554 this now makes it easier for PHPStan to understands what's going on.

This will allow TwigStan to handle for loops in v4.

Commits
-------

e4f6bf8 Call For recurseFunc inline
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