Vagrant Support in PhpStorm

The latest version of the PhpStorm 7 EAP comes with Vagrant integration! Vagrant is a tool which helps us create reproducible development environments. By scripting a virtual machine, Vagrant allows us to share a development machine by sharing a simple script. Other developers can then launch an identical machine by running the vagrant up command. Or by doing this from within the IDE!

Once the Vagrant Box is up and running, we can also make use of the built-in SSH terminal in PhpStorm to work on the virtual machine remotely.

The built-in SSH terminal is nice, the “vagrant up, halt, restart” menu is ok, almost unnecessary…

The amazing thing would be integrating phpmd, phpcs, phpunit, code coverage and things like that directly with the built-in ssh (through that, integrating with vagrant).

Basically, we tell the IDE where are the executables (eg. /usr/local/phpcs) and the IDE call it and read the output through a terminal… not necessarily as a core feature, but will someone be able to develop this as a plugin?

Moreover, you can configure any SSH Remote External Tool in Settings | Remote SSH External Tools – so you can add some tools configured in vagrant.

Michael Goodness

This isn’t strictly true, though, is it? My understanding is that we can’t use the IDE’s code coverage functionality in a “PHPUnit on Server” configuration. I’ve tried, and the “Run with Coverage” button is always disabled. If I’m missing a setting, I’d sure appreciate being pointed in the right direction.

it seems that PuPHPet is not fully supported on PHP Storm; i execute the “up” command and the VM is created, but all the PuPHPet customization it’s not installed. then, i’ve executed vagrant up manually from the local folder and the “up” command launched the PuPHPet customization OK. i suspect that PHP Storm executes only the vagrant part because some type of path problem