Fix BcMath\Number increment/decrement#4957
Conversation
|
You've opened the pull request against the latest branch 2.2.x. PHPStan 2.2 is not going to be released for months. If your code is relevant on 2.1.x and you want it to be released sooner, please rebase your pull request and change its target to 2.1.x. |
eded554 to
c369be5
Compare
VincentLanglet
left a comment
There was a problem hiding this comment.
You need to target 2.1.x
c369be5 to
a5fac39
Compare
|
Rebased and targeted to |
|
Hmm.. I wanted to make sure that we report errors on PHP < 8.4 when the polyfill is installed, but looks like the test doesn't report any errors. |
85fd9f3 to
5f4370d
Compare
|
Please take a new look @staabm with the changes |
|
I like the PR so far. per https://www.php.net/manual/en/class.bcmath-number.php
this class also has special comparison semantics. I think it would make sense to cover both aspects in this PR. |
Isn't already handled by ? |
5f4370d to
4e25325
Compare
|
you are right. its covered in tests/PHPStan/Analyser/nsrt/bcmath-number.php |
|
thank you @mpesari |
Partial fix for phpstan/phpstan#13965
This adds support for BcMath\Number increment/decrement operations on PHP >= 8.4.