Skip to content

Conversation

VincentLanglet
Copy link
Contributor

This reverts commit f615b1a.

Copy link
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.

thanks 👍

@VincentLanglet
Copy link
Contributor Author

Friendly ping @ondrejmirtes

This PR might be forgotten since I assume it's a quick review.
It revert f615b1a as asked in #3980

(int) '00' can still be 0.

@staabm
Copy link
Contributor

staabm commented Jul 11, 2025

(int) '00' can still be 0.

Please add a test for this case so we see it next time earlier

@VincentLanglet
Copy link
Contributor Author

(int) '00' can still be 0.

Please add a test for this case so we see it next time earlier

How do you want to add such test ?

There is already a test checking that (int) non-falsy-string is an int (and I added a comment).

If I add a test for the special case '00' it will be useless since the methode used will be from ConstantStringType and not AccessoryNonFalsyStringType

@staabm
Copy link
Contributor

staabm commented Jul 11, 2025

I see, thanks for looking into it.

@ondrejmirtes ondrejmirtes merged commit 7b2ff7a into phpstan:2.1.x Jul 17, 2025
414 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

Development

Successfully merging this pull request may close these issues.

4 participants