Using remote editing with third-party libraries Follow
I've got a PHPStorm project that uses the SQLAnywhere library, but in the IDE, the calls to things like sasql_connect are highlighted with "undefined function".
What should I change to get PHPStorm to know about the SQLAnywhere library?
One of the things I'm doing that's a little odd is using a Windows-based IDE to edit files on a Linux webserver. It's a surprisingly pleasant environment and remote debugging is great, but remote unit tests don't seem to work. I understand that this is a known issue and hope that it will be fixed soon.
Please sign in to leave a comment.
If this library/extension is not supported by PhpStorm already ... then the only thing you can do right now is to create stub file, place it anywhere in a project so PhpStorm will know what all those functions are.
Stub file is basically a PHP file with class/functions/constants/variables/etc definitions (with proper PHPDoc comment blocks) but all function/method bodies are empty -- that's how all classes/functions/etc that are supported by PhpStorm ATM are implemented.
You can see an example of such files in:
How do I find out if that library is supported? Is it just a case of seeing if it recognises the function name?
Pretty much "Yes" -- especially in your case (where these functions have some unique prefix in their names).
Ah, well, given that it's got a yellow highlight, I suppose that means it's a no! ;-)
You are correct -- it's not supported (as to my knowledge).
You can submit new ticket to the Issue Tracker... and it may get eventually added .. but considering how "widely" this library is used (no one complained about this yet, AFAIK), it may take quite some time (if ever). Therefore I think it will be faster and better to implement such stub file yourself -- I doubt you need all possible functions/etc definitions -- only those that you actually using -- it should take you less than hour to do that (maybe even 10 mins -- depends on number of functions and PHPDoc comments details etc).