-
Notifications
You must be signed in to change notification settings - Fork 72
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
Unknown symbol mongodb\driver\monitoring\addsubscriber #432
Comments
I have tested this locally. If I have This is the output when I remove the
This suggests that the problem here is that the case for the intended function is incorrect. However, the all-lowercase version seems to behave the same for me (in that when I call this without any arguments, it gives the same error). Should Meanwhile, I recommend that @bogdandubyk use the "correct" case for this function. |
Symbols in PHP don't follow consistent casing rules, so functions behave different than variables and constants, afaik. |
hmm, @fredden you are right, and I initially had it like |
Thanks for the update @bogdandubyk. That sounds like a bug in PHPStan if it's recommending a different case than is used in the documentation. Edit: I've opened phpstan/phpstan#10003 for this. |
Possibly wrongg stubs in PHPStan? |
The related PHPStan bug has been fixed. |
I have used
https://www.php.net/manual/en/function.mongodb.driver.monitoring.addsubscriber.php
function in my code, and require checked failing withUnknown symbol mongodb\driver\monitoring\addsubscriber
even if I'm adding that function to whitelist like this:how can I fix that issue?? Thank you!
The function is imported to class like this:
in composer I have
and
The text was updated successfully, but these errors were encountered: