Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
Adding a remote PHP interpreter from deployment configuration...
Adding a remote PHP interpreter from deployment configuration...

When one or more SFTP deployment configurations are configurations are present, for example when using Deployments in PhpStorm, the IDE will offer a third option: we can select the Deployment configuration option to use an existing configuration to connect to a remote PHP interpreter.

...

Remote debugging of PHP CLI scripts is possible when the remote PHP interpreter and deployment server with proper mappings are configured. Mappings can be also fetched from valid .Vagrantfile.

In order to take advantage of debugging with remote PHP interpreters, follow this workflow:

1. Make sure that remote PHP interpreter is configured and selected for current project in Settings/Preferences | Languages & Frameworks | PHP, and Xdebug extension is installed (read more on Xdebug installation).

2. Configure SFTP deployment server in that matches Remote Interpreter settings in Settings/Preferences | Build, Execution, Deployment | Deployment with proper mappings (if you don't have it configured yet).

...

Info

Please note that remote debugging with remote PHP interpreters is currently available for Xdebug only (not for Zend Debugger).

hidden-data



h3. Composer and Remote PHP

...

PHP interpreter is a project setting in PhpStorm: it will be used for all actions that require the PHP executable, for example for running the various Composer commands. When a remote PHP interpreter is configured, the Composer Support in PhpStorm may break because the remote PHP interpreter will potentially not have access to the project path on our development machine.

Through Project Settings | PHP | Composer, we can specify the PHP interpreter to use for running Composer commands.

Image Removed

...

 Interpreters

{color:#333333}PHP interpreter is a project setting in PhpStorm: it will be used for all actions that require the PHP executable, for example for running the various{color} [Composer|http://getcomposer.org] {color:#333333}commands. When a remote PHP interpreter is configured, the{color} [PhpStorm:Composer Support in PhpStorm] {color:#333333}may break because the remote PHP interpreter will potentially not have access to the project path on our development machine.{color}

Through *{_}Project Settings \| PHP \| Composer{_}*, we can specify the PHP interpreter to use for running Composer commands.

!composer-remote-interpreter.png!

Once configured, PhpStorm will use the remote PHP interpreter for commands that can be run remote, for example running PHPUnit tests, and a local interpreter for Composer.

PHPUnit and Remote PHP Interpreters

...