Remote external libraries - Is it possible?

Hello, 

We have a number windows machines that use a single linux remote development server. This development server holds a collection of common libraries that we use on each project. 

Each PHPStorm IDE is set to use the remote interpreter on the development server and that side of things works well.

Is it possible to use the libraries on that remote server as external libraries in PHPStorm? Selecting the Interpreter as our remote, and specifying the absolute include path to where the libraries are on the server fails. Seems to only allow local libraries? 

We'd really rather not have to manage these common libraries on individual machines if possible.

Cheers, 

1 comment
Comment actions Permalink

Hi there,

Yes and No.

Yes -- you could map the remote folder as local drive (Windows) or mount into local file system (Mac/Linux) so that IDE would think it's local -- this should work.

No -- the pure remote libraries (like you described them) are not supported as IDE needs to access them in order to index them (for code completion etc). Even if you do it in as "Yes" section -- it's still not recommended to work with files directly over network -- IDE requires fast access to source files at any time and when working over network, the latency (which is much higher than local HDD/SSD access) may cause random short freezes/lags out of nowhere (for some people it works OK but most people experience them in some form or another).

Keep in mind that:

  • remote interpreter is for executing your code directly on remote machine in CLI environment (actual project code; PHPUnit tests etc). Remote interpreter is unnecessary if all you want is to debug your code server by web server (in a browser)
  • your libraries (3rd party or not) are still part of your project (they are requirements; without them it most likely will not work) so you better handle them in a same way as other local libraries -- VCS (or whatever you are using there)
1

Please sign in to leave a comment.