Remote Tools via Remote PHP Interpreters in PhpStorm 9

Remote PHP interpreters (introduced in PhpStorm 8) let you run your application and tools on a production-like environment. You can easily use a Vagrant-run virtualized environment with all the tools in place.

In PhpStorm 9, which is scheduled for release later this month, so-called remote development (when your development environment is not local) becomes a reality, with support for PHP Code Sniffer and Mess Detector via remote PHP interpreters.

In general, a remote PHP Code Sniffer or Mess Detector is configured similarly to a local one. To begin, you need to have a PHP interpreter (remote PHP interpreter in our case) set up in Settings/Preferences | Languages & Frameworks | PHP | Servers:

remote_tools_1

Read the full tutorial on working with remote PHP interpreters in PhpStorm for more details.

PHP Code Sniffer can be configured in Settings/Preferences | Languages & Frameworks | PHP | Code Sniffer. Select a development environment configuration (the default options are Local and By default project interpreter):

remote_tools_2

To run Code Sniffer remotely, you need to create a new configuration first:

remote_tools_3

Then select a newly created configuration or By default project interpreter. (Note that in the latter case, you should also select a remote interpreter as the default one for this project in Settings/Preferences | Languages & Frameworks | PHP). By default project interpreter is used for quick switch of phpcs on interpreter change (local to remote and vice versa). By default project interpreter will not make any difference if you’re switching between two local interpreters.

PHP Mess Detector can be configured similarly in Settings/Preferences | Languages & Frameworks | PHP | Mess Detector:

remote_tools_4

As soon as PHP Code Sniffer or Mess Detector are configured, enable the relevant inspection in Settings/Preferences | Editor | Inspections | PHP | PHP Code Sniffer validation / PHP Mess Detector validation. Read full tutorials on using PHP Code Sniffer in PhpStorm and using PHP Mess Detector in PhpStorm.

Download the latest PhpStorm 9 Public Preview and give remote tools via remote PHP interpreter a try! Please share your thoughts, feature requests, or issues through the issue tracker, by posting in the comments below, or in our forums.

Develop with pleasure!
– JetBrains PhpStorm Team

This entry was posted in Cool Feature, Early Access Program and tagged , , , , , . Bookmark the permalink.
  • Luis Ramón López

    What about running Composer from a remote interpreter? I really miss this feature