-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[8.x] Declare that abort(), dd() and kill() never return #39108
Conversation
Strictly speaking this is a PHP 8.1 feature right? The |
Strictly speaking,
I'm not aware of any other function in Laravel that never returns, but feel free to point those out. This PR focusses on
Generally speaking, it's easier to get a smaller PR merged (i.e. approved). |
Actually, Update: But the global |
The ones with guaranteed |
See symfony/symfony#43343 for adding |
@bert-w Feel free to list any other functions that never return, but please do note that this PR does not claim to be exhaustive. It is useful as is. |
* abort() never returns * Application::abort() never returns * App::abort() never returns * Queue\Worker::kill() never returns * Database\Query::dd() never returns * Stringable::dd() never returns
@TBlindaruk Thanks for the 8.64.0 release today! 🎉 I noticed that this PR didn't make it into the release notes, and just wanted to ask if this is intentional or whether I did something wrong on my side? |
@caugner things like DocBlock changes aren't always added to the release notes but they have no effect on the public API. |
@driesvints Thanks, that makes sense. So release notes entries are written manually. I would have just expected an entry for this, because it might cause additional warnings reported by IDEs and static analyzers, and the release notes don't give a hint why. |
This helps static analyzers like PHPStan and Psalm in cases like the following: