We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In PHP 8.1 this code throws a deprecation warning: https://3v4l.org/ZV6On
Whereas PHPStan ignores the optional parameter if it has a NULL default.
With string default there's an error: https://phpstan.org/r/3b7755fa-3d5f-4c4f-a908-1fab2e418da3 With NULL default there's no error: https://phpstan.org/r/66ee3543-d33b-445b-ba59-8ef61fb76c98
Deprecated: Optional parameter $arg2 declared before required parameter $arg3 is implicitly treated as a required parameter
The text was updated successfully, but these errors were encountered:
Implemented phpstan/phpstan-src#2963
Sorry, something went wrong.
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.
Successfully merging a pull request may close this issue.
Bug report
In PHP 8.1 this code throws a deprecation warning: https://3v4l.org/ZV6On
Whereas PHPStan ignores the optional parameter if it has a NULL default.
Code snippet that reproduces the problem
With string default there's an error: https://phpstan.org/r/3b7755fa-3d5f-4c4f-a908-1fab2e418da3
With NULL default there's no error: https://phpstan.org/r/66ee3543-d33b-445b-ba59-8ef61fb76c98
Expected output
Deprecated: Optional parameter $arg2 declared before required parameter $arg3 is implicitly treated as a required parameter
The text was updated successfully, but these errors were encountered: