Skip to content

Do fast check first#5396

Merged
VincentLanglet merged 1 commit intophpstan:2.1.xfrom
VincentLanglet:cheapCheck
Apr 4, 2026
Merged

Do fast check first#5396
VincentLanglet merged 1 commit intophpstan:2.1.xfrom
VincentLanglet:cheapCheck

Conversation

@VincentLanglet
Copy link
Copy Markdown
Contributor

While working on #5394 I found this

Also, this helper rely a lot on IsSuperTypeOf result but then transform checks into boolean and lose the reason.
I feel like it would be great to keep the reasons to add them as tips of the errors.

@VincentLanglet VincentLanglet requested a review from staabm April 4, 2026 10:03
Copy link
Copy Markdown
Contributor

@staabm staabm left a comment

Choose a reason for hiding this comment

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

Can we come up with a test showing a missing tip?

@VincentLanglet
Copy link
Copy Markdown
Contributor Author

Can we come up with a test showing a missing tip?

This will be in another PR, here I don't add the tip yet and just improve the perf with a fast check

@VincentLanglet VincentLanglet requested a review from staabm April 4, 2026 10:38
@VincentLanglet VincentLanglet merged commit dab4101 into phpstan:2.1.x Apr 4, 2026
656 checks passed
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