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
Incorrect signature for the set_error_handler()
callback in PHP >= 8
#6619
Comments
This is the actually crashing code that should be reported by PHPStan on PHP 8.0+: https://3v4l.org/pp25P Looks like And then add a line in https://github.com/phpstan/phpstan-src/blob/master/resources/functionMap_php80delta.php with a signature relevant for 8.0+. Thanks. |
There is an entry, I think there's something up with GitHub's rendering of large files. I'm working on a PR at the moment. |
Awesome 👍 |
The playground now gives expected results :) |
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
Since PHP 8 the
$errcontext
parameter is no longer passed to the callback registered withset_error_handler()
. This is not detected by PHPStan.Code snippet that reproduces the problem
Expected output
The
$errcontext
parameter of the callback signature should be conditional depending on the PHP version.Did PHPStan help you today? Did it make you happy in any way?
Always :-)
The text was updated successfully, but these errors were encountered: