Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Apr 19, 2025

@staabm staabm marked this pull request as ready for review April 19, 2025 09:45
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

Comment on lines +2601 to +2602
$parametersAcceptor instanceof ClosureType && count($parametersAcceptor->getImpurePoints()) > 0
&& $scope->isInClass()
Copy link
Contributor Author

@staabm staabm Apr 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last open question: do we want to invalidate 'this' in this case for regular function calls with side-effects?
we only handle Closure at this point right now

see #3950 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scratch that. A function is pretty unlikely to affect $this or self

@ondrejmirtes ondrejmirtes merged commit 7489a09 into phpstan:2.1.x Apr 20, 2025
416 of 417 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants