-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
Signature mismatch for Locale::getPrimaryLanguage #7855
Comments
Please follow this: https://github.com/phpstan/phpstan/issues/new?assignees=&labels=&template=Function_signature_mismatch.md
|
@lazka After the latest push in 1.11.x, PHPStan now reports different result with your code snippet: @@ @@
-PHP 8.0 – 8.2 (1 error)
+PHP 8.0 – 8.2 (2 errors)
==========
3: Expression on left side of ?? is not nullable.
+4: Expression "\locale_get_primary_language(\str_repeat('a', 200)) ?? 'en'" on a separate line does not do anything.
-PHP 7.1 – 7.4 (2 errors)
+PHP 7.1 – 7.4 (3 errors)
==========
3: Expression on left side of ?? is not nullable.
+4: Expression "\locale_get_primary_language(\str_repeat('a', 200)) ?? 'en'" on a separate line does not do anything.
4: Expression on left side of ?? is not nullable. Full reportPHP 8.0 – 8.2 (2 errors)
PHP 7.1 – 7.4 (3 errors)
|
@lazka After the latest push in 1.11.x, PHPStan now reports different result with your code snippet: @@ @@
-PHP 8.0 – 8.2 (1 error)
-==========
-
-3: Expression on left side of ?? is not nullable.
-
-PHP 7.1 – 7.4 (2 errors)
-==========
-
-3: Expression on left side of ?? is not nullable.
-4: Expression on left side of ?? is not nullable.
+4: Expression "\locale_get_primary_language(\str_repeat('a', 200)) ?? 'en'" on a separate line does not do anything. Full report
|
Fixed phpstan/phpstan-src#2880 |
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. |
See https://phpstan.org/r/59007ebf-a020-4e0d-884e-0e5854a3b925
I expect it to not show any errors there.
The text was updated successfully, but these errors were encountered: