PhpStorm has a list of method stubs from various compile-time libraries here that it will use for autocompletion in development.
I currently have a list of stubs for the PHP AMQP PECL extension here that I would like to add to my PhpStorm build to get autocompletion for that library.
Is there any way to do this?
Just place such stub file(s) anywhere in your project (or reference in any other supported way, e.g. as Settings | Languages & Frameworks | PHP | Include path
) -- IDE will use it for code completion (and similar) purposes only (so you can exclude them from uploading/VCS etc).
In long term -- you may submit the PR to the already mentioned PhpStorm stubs repository and it may become part of the standard PhpStorm distribution on next release.
January 2017 Update: You can git clone
(checkout) the PhpStorm stubs repository to your local machine, and point PhpStorm to that directory. From there you can add stubs or even modify/delete existing stubs.
git clone https://github.com/JetBrains/phpstorm-stubs
...
and navigate to the root of your phpstorm-stubs
folderIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With