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
array_shift, null coalescing operator and throw #8164
Comments
interesting, |
ah I'm an idiot, of course it is added, but |
|
i tried manually adding |
Did you follow the steps in the file comment of https://github.com/phpstan/phpstan-src/blob/1.9.x/resources/functionMetadata.php ? |
not gonna lie, i missed that comment entirely, thanks @staabm however manually updating the file should be a quick estimate of the outcome of those steps right? so there has to be another issue at play here |
Duplicate of #8084 |
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. |
Bug report
playground: https://phpstan.org/r/3a7ec8b3-fd08-4eee-b3a7-2f2098b6ec15
yields:
Expression on left side of ?? is not nullable.
Expected output
since array_shift can and will return null, i'd expect this to be valid. and raise no errors
Did PHPStan help you today? Did it make you happy in any way?
as happy as ever, this is such a help on a day to day basis! :)
The text was updated successfully, but these errors were encountered: