I’m using a few PECL installed extensions in my PHP environment. I am developing with Eclipse and it would be useful to have Eclipse’s code assist / auto-completion support for these extensions. This procedure worked quite well for the Solr extension:
- I additionally downloaded the latest solr-php PECL sources and put them into a separate folder.
- I added this certain folder as an “external folder” to one of my User Libs (Prefrences -> PHP -> PHP Libraries).
- I added the user lib to my project’s php include path (Properties -> PHP Include Path -> Libraries -> Add Library)
- I immediately had the new classes/methods available in the editor’s auto-completion.
The problem is: This doesn’t seem to work for all extensions. E. g. for the extension adding MongoDB support to PHP. Why is that?
Comparing the folders’ contents I notice that the Mongo extension is missing a php file like docs/documentation.php (which is contained in the Solr extension). Whereas all relevant *.h and *.c files are available.
Do I have to generate certain file(s) by myself?
Thanks in advance for your hints, cheers!
After posting the question at mongodb’s user group I got a link containing *.php doc files for the mongo php driver, which solved my problem after including them in my eclipse/pdt environment.
A generate.php script is offered by the pdt project, the new link was given by @ss333 below.