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.

Have a look at our tutorials page on Vagrant support for detailed instructions. If you are new to Vagrant, check out their website as well as PuPHPet to quickly craft a virtual machine with all the packages you need.

Give PhpStorm 7 EAP a try. And as always, let us hear your thoughts in the issue tracker, through 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.
  • Gustavo

    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?

    • Mikhail Vink

      Well, we actually have built-in support for PHPUnit with code coverage (including PHPUnit on server), so it can be run easily. Please check this webhelp page http://www.jetbrains.com/phpstorm/webhelp/enabling-phpunit-support.html

      As for phpmd and phpcs please check Settings | PHP | Mess Detector and Settings | PHP | Code Sniffer – you can provide executables paths there, than enable phpcs/phpmd inspection in Settings | Inspections | PHP and it will output right in the editor marking validating code on-the-fly.

      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.

  • http://jlcoady.net Josh C

    Any idea if/when this is coming to the ultimate edition?

    • Maarten Balliauw

      We can’t give an exact timing so far but it will come to IntelliJ IDEA for sure.

  • Phil Moorhouse

    Will this include syntax highlighting support for vagrant and puppet files in the editor?

    • Maarten Balliauw

      You could use TextMate bundles to do this.

    • http://enden.com Rafal Enden

      You can add Vagrant file to Perl filetypes (Preferences > File Types > Perl).
      It will work fine since Perl syntax is similar to Ruby.

  • Alan Pich

    Is there any way of proxying the built-in phing support to a vagrant box? Would be excellent to be able to call phing tasks on a project, but have them executed in the vbox/vagrant environment

  • Pingback: Już jest PhpStorm 7.0: PHP 5.5, Vagrant, SSH, wsparcie frameworków i inne | webMASTAH

  • Kukusf

    This is amazing!!!

  • David

    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

    • Maarten Balliauw

      Do you have all files and folders in the project root? Here’s the repo I used in the demo video: https://github.com/maartenba-demo/VagrantDemo

    • daniel

      I had the same problem.
      It didn’t work until i called “vagrant up” from the terminal.

  • Seydamet

    It would be nice if vagrant autostart for current project when I open my IDE. And vagrant suspend if I close it.

  • Pingback: Vagrant? Кто такой? Чем знаменит? | Блог DataArt

  • Pingback: Running PHPUnit tests over SSH on Vagrant with PhpStorm 8 | JetBrains PhpStorm Blog