Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 10, 2025

types which get narrowed in __construct() on readonly properties can be useful when analyzing other methods.

improve support initially added with #3930 by allowing property-fetch-chains, when all involved properties are readonly.


preparational work for #4313 (comment)

commit1 extracts 1:1 a new method
commit2+3 adds support for property-fetch chains
commit4 re-use the new method for shouldInvalidateExpression()

@staabm staabm marked this pull request as ready for review September 10, 2025 13:00
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit c9b031e into phpstan:2.1.x Sep 10, 2025
450 of 456 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the refac branch September 10, 2025 18:33
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.

3 participants