1

I am learning PHP REST + MongoDb. I had installed mongodb PHP library using "composer require mongodb/mongodb".

But I am not able to use any type from MongoDB\BSON\XXXXX. Visual studio code says *MongoDB\BSON* is not even a package. I tried "use MongoDB\BSON\UTCDateTime" but with no luck. VSCode error

I tried looking into package "mongodb/mongodb" under vendor's folder. In functions.php, I am facing the same issue.MongoDb PHP library

Without using package "MongoDB\BSON\XXXX", I am able to access data from database. So I don't think I am missing something major.

Am I missing something to install or configure?

SatbirSingh
  • 198
  • 1
  • 11

0 Answers0