Skip to content
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

IntegerType::toString is lowercase #3510

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Sep 27, 2024

Which is useful to keep

$lowercaseString . $integer

as a lowercase string.

@staabm
Copy link
Contributor

staabm commented Sep 28, 2024

I recently learned about https://3v4l.org/nvKP7

not sure thats something anyone is doing though

Update: ahh its a float, doesn't matter then: https://3v4l.org/sC13o

@VincentLanglet
Copy link
Contributor Author

Yes,

Int to string is a lowercase string but not float to string.

@ondrejmirtes ondrejmirtes merged commit 328b6ad into phpstan:1.12.x Oct 6, 2024
478 of 499 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@ondrejmirtes
Copy link
Member

Hi, this broke tests on phpstan-doctrine for some PHP versions and I don't understand why only for some. I'm reverting this. Feel free to investigate and fix it there. Thanks.

See https://github.com/phpstan/phpstan/actions/runs/11202848434

@VincentLanglet
Copy link
Contributor Author

Hi, this broke tests on phpstan-doctrine for some PHP versions and I don't understand why only for some. I'm reverting this. Feel free to investigate and fix it there. Thanks.

See phpstan/phpstan/actions/runs/11202848434

Hi @ondrejmirtes this is "expected", the behavior seems to be different in PHP < 8.1
cf this code
https://github.com/phpstan/phpstan-doctrine/blob/14a59bb5b719d3740224b6ba8aec80c0294142f9/tests/Type/Doctrine/Query/QueryResultTypeWalkerTest.php#L1633-L1643

I assume adding the LowerCase accessory to https://github.com/phpstan/phpstan-doctrine/blob/14a59bb5b719d3740224b6ba8aec80c0294142f9/tests/Type/Doctrine/Query/QueryResultTypeWalkerTest.php#L1590 might solve all the issues.

So to me, it's all good, we could revert the revert and just fix the tests.

@ondrejmirtes
Copy link
Member

Please try to send a PR to phpstan-doctrine on 1.5.x branch and pin phpstan/phpstan to the non-reverted version (1.12.6).

@VincentLanglet
Copy link
Contributor Author

Please try to send a PR to phpstan-doctrine on 1.5.x branch and pin phpstan/phpstan to the non-reverted version (1.12.6).

Done phpstan/phpstan-doctrine#614 @ondrejmirtes

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.

None yet

3 participants