How to have eclipse resolve php classes in MongoDB\BSON namespace?

Viewed 915

After many comes and goes I managed to install the MongoDB Driver for PHP 5.6 and made it work on OSX El Capitan. (The way it worked was using Homebrew)

To start working on a project I created the folder for the project and using Composer installed the required packages I needed. Between theese packages I required mongodb/mongodb which is the recomended mongo php library to use by the php Manual on line and in the driver github page.

The problem I found is that Eclipse is resolving the classes in the \MongoDB\ namespace but not in the \MongoDB\BSON\ namespace. If I check what Composer installed in the vendor folder I am able to see that the \MongoDB\BSON\ classes in fact are missing. On the other hand if I run the program in the PHP included webserver, it executes as expected.

So my question is how can do or what am I missing for Eclipse to find the missing classes. Are they defined somewhere else?

If this is not possible because they are compiled into a binary library and I have no way to resolve them, Is there any way to have Eclipse not showing these particular classes as mistakes?

Example of class that runs ok in the webserver, but is highlighted as an error in Eclipse:

$fecha_creacion  = new MongoDB\BSON\UTCDateTime();
1 Answers
Related