-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
wp_die return type is wrong #248
Comments
This same mistake is there for other stuff too - e.g. |
@kkmuffme How many laser eyes do you have? 🙃 |
Each of these is tested with an additional key. None of the tests are failing. Why is this? |
Maybe because phpstan doesn't seal arrays by default (like how it was in psalm pre-v5)? |
For PHPStan |
Yes (as it should be, since that behavior you just described was a bad design choice taken in psalm initially and copied by everybody) |
The problem is that you’re using Psalm, and therefore @szepeviktor Perhaps we could add support for this? See phpstan/phpdoc-parser#169. |
No, the problem is not that I'm using Psalm, it's that your type is wrong. If you want to know why, look up why we changed the behavior in psalm |
I do not want to work on this package & I keep a distance from Psalm. |
Don't need to, the fix will be PRed anyway.
Why? :-) |
It has dark roots. That is all. I do not want to spark emotions. |
If I may ask bc I'm unaware (and have contributed quite a bit to psalm): bc of initial funding of psalm? or personal experience with psalm's team? |
Sorry. That is all. I've read it on psalm.dev many years ago. |
* Use unsealed shapes in conditional return types #248 * Remove mistakenly added unsealed shapes * Replace ... notation with pseudo intersections * Replace ... notation with pseudo intersections
https://github.com/php-stubs/wordpress-stubs/blame/v6.6.2/functionMap.php#L56
)
too much at the endarray{exit: false}
is wrong, since the array can have other keys in it too, e.g.code
and the correct type would bearray{exit: false}&array
https://developer.wordpress.org/reference/functions/wp_die/
The text was updated successfully, but these errors were encountered: