The class MongoDB\BSON\UTCDatetime does not exist. Did you forget a USE statement, or did you not list all dependencies?
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your composer.json file (if available) to determine the
dependencies of your project and to determine all the available classes and functions.
It expects the composer.json to be in the root folder of your repository.
Are you sure this class is defined by one of your dependencies, or did you maybe
not list a dependency in either the require or require-dev section?
2. Missing use statement
PHP does not complain about undefined classes in ìnstanceof checks. For
example, the following PHP code will work perfectly fine:
if($xinstanceofDoesNotExist){// Do something.}
If you have not tested against this specific condition, such errors might go
unnoticed.
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.