-
-
Notifications
You must be signed in to change notification settings - Fork 887
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
Incorrect mixed type with openssl_sign and signature variable #11791
Closed
Comments
Related to rectorphp/rector#8847 |
Please follow #11777 |
piotrekkr
added a commit
to piotrekkr/phpstan-src
that referenced
this issue
Oct 3, 2024
…re` variable type which is now shown as `mixed` instead of `string`. Fixes phpstan/phpstan#11791
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
When using
openssl_sign
, signature variable is reported as mixed when it should be reported as string. As a resultrector
tool is adding(string)
cast forbase64_encode($var)
when used. Then after rector psalm complains about unnecessary cast to string.By following docs on
openssl_sign
So type should not be changed from string to mixed after
openssl_sign()
is used.Code snippet that reproduces the problem
https://phpstan.org/r/5567ebe6-946a-4f5d-a0e0-871133d0cb33
Expected output
Dumped type: string
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: