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


after many comes , goes managed install mongodb driver php 5.6 , made work on osx el capitan. (the way worked using homebrew)

to start working on project created folder project , using composer installed required packages needed. between theese packages required mongodb/mongodb recomended mongo php library use the php manual on line , in the driver github page.

the problem found eclipse resolving classes in \mongodb\ namespace not in \mongodb\bson\ namespace. if check composer installed in vendor folder able see \mongodb\bson\ classes in fact missing. on other hand if run program in php included webserver, executes expected.

so question how can or missing eclipse find missing classes. defined somewhere else?

if not possible because compiled binary library , have no way resolve them, there way have eclipse not showing these particular classes mistakes?

example of class runs ok in webserver, highlighted error in eclipse:

$fecha_creacion  = new mongodb\bson\utcdatetime(); 

reading this post , not finding newer on subject arrived conclusion developers of driver don't provide php sources , leave ide developers provide stubs different fuctions of driver in way ide can recognize functions , provide syntax checking , documentations popups.

following question, ended finding jetbrains github there many different stubs phpstrom, one among them.

so copied file , added project part of sources. , solved problem.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -