-
-
Notifications
You must be signed in to change notification settings - Fork 26
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()
doesn't end script anymore
#203
Comments
@IanDelMar Please hotfix this 🔥 |
Seems like |
@IanDelMar Wait! |
Looks like a test is needed for |
Was at work. Will have a look at it now. |
I added tests for phpstan-wordpress/src/WpDieDynamicFunctionReturnTypeExtension.php Lines 31 to 34 in 78db560
|
Okay. |
@Screenfeed What is you phpstan-wordpress and wp-stubs version? |
@szepeviktor Sorry I should have mentioned that in the OP.
|
Does PHPStan know about the dynamic return type of a function when that function is called by another function? |
Yes. |
@IanDelMar Adding back |
@ondrejmirtes Could you help us? |
Look at this: /**
* @phpstan-return never
*/
function foo() {
\PHPStan\dumpType(wp_die());
wp_die();
}
\PHPStan\dumpType(foo());
|
😲 |
There is a NonAcceptingNeverType, is that the correct type to return in the extension? |
Yess please! |
I was wondering why it's |
|
Yeah, use |
Thank you. |
@Screenfeed This release is for you. |
Yes! It's ok for us 👍 Thank you so much 😉 |
@szepeviktor Perfect. Thanks a lot to everyone! ❤️ |
Hello,
Sorry to bring bad news. Unless I'm missing something, it seems that something went wrong with #201.
This ends with the following message:
Versions used:
The text was updated successfully, but these errors were encountered: