Skip to content

Case mismatch for MongoDB\Driver\Monitoring\addSubscriber function #10003

Description

@fredden

Bug report

The official documentation[1] says the function is called MongoDB\Driver\Monitoring\addSubscriber, but PHPStan recommends using mongodb\driver\monitoring\addsubscriber instead. This is causing issues over in ComposerRequireChecker[2]

[1] https://www.php.net/manual/en/function.mongodb.driver.monitoring.addsubscriber.php
[2] maglnet/ComposerRequireChecker#432

Code snippet that reproduces the problem

https://phpstan.org/r/e74e86d4-3bf8-41f5-95d3-4744dda0d40f

Expected output

Error on line 7:
Call to function MongoDB\Driver\Monitoring\addSubscriber() with incorrect case: mongodb\driver\monitoring\addsubscriber

No error on line 8.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions