By Bruno Skvorc

PhpStorm 8 – New Features

By Bruno Skvorc

Jetbrains is famous for the early access program on the IDEs they make – a pre-release version of the IDE is made publicly available months ahead of release time, so people have time to test it, report bugs and provide feedback. It’s like beta, just not the beta we’re used to today (modern “beta” is a kind of excuse for a product to suck for a long time). After the EAP is done, they move onto beta, fully test the features they’ve implemented and fix bugs, and only then release.

PhpStorm, my personal IDE of choice, and one we’ve covered before, is now approaching version 8 and has had its EAP version available since March 6th, 2014. Let’s take a look at what’s coming through their changelogs and EAP posts and additionally explain the most important features with links and/or clarifications (we won’t be covering bug fixes, read the release logs for those).

Drupal 8 Support and Multiple Cursor

EAP 134.1456 introduced the EAP’s beginning and announced several highly requested features like:

  • multiple cursor (see detailed post here)
  • Drupal 8 support (see detailed post here)
  • Improved formatting of chained calls
  • Quick Documentation for live templates
  • Local History for selected function, class or method
  • New PHP formatting options: Class fields alignment
  • Unwrap/remove action for control structures
  • New PHP debug feature: Copy array/object value path (in variable context menu)
  • Generate multiple getters/setters for a field
  • Type inference: instanceof with OR, support for array access via constant
  • Advanced AngularJS support (details here)
  • Spy-js JavaScript tracing tool integration (details here)
  • New Live console in JavaScript and Node.js debugger that allows you to enter commands and code
  • Bower integration: search through Bower registry, manage components in the IDE
  • RequireJS aliases support
  • CucumberJS and Less 1.6 support
  • Live templates are now suggested in code completion
  • Code blocks automatically indent after closing a curly brace

Find the rest here or on the original EAP post.

PhpUnit 4.0 Support

Two weeks later, EAP 136.1255 introduced the following changes:

  • WordPress support (see tutorial here and announcement post here)
  • PhpUnit 4.0 support (details here)
  • Structural Search and Replace is now bundled
  • Constant alignment options in coding style
  • Debugging with node-webkit
  • Updated Dart and Spy-js plugins
  • Autocomplete now suggests the input type=file as well

..and more. To see the full list, see the original EAP post or the release notes.

Remote Interpreters

Another week after the last EAP, 136.1382 came out and support for remote PHP interpreters was added (which allows developers to use PHP interpreters over SSH, running debug and testing tools remotely) – see how to use this here – and full support for PHPUnit via SSH (with multiple configurations) was introduced. Likewise, the WordPress and Composer command line tools can now work with pure executable. For an exhaustive list of these minor changes read the full EAP post or the release notes.

Markdown Support in PhpDoc comment blocks

On April 3rd in EAP 136.1476, a notable new feature was added among others – Markdown support in PhpDoc comment blocks. You can read the details of this implementation, as well as see a demo use case, in this post. Markdown was implemented due to PhpDocumentor’s support of MarkDown as stated here, but it’s fair to say that this goes a bit against the grain and exposes bias towards that particular tool. The main competitor to PhpDocumentor, ApiGen, is missing this aspect.

Other improvements include multiple PHPUnit configurations for both local and remote runs now, a missing @throws report fix, and more. More features and bug fixes can be seen in the release notes.

PHPUnit Coverage on Remote Interpreters

Less than a week after the last EAP, the Jetbrains team released EAP 136.1575, with added PHPUnit 4.0 coverage support for remote interpreters – a feature introduced a mere two EAP versions ago – and drastically improved indexing performance, improving the workflow smoothness on larger projects. Debugging with node-webkit was added, too, and a new text editing shortcut was added in which command/ctrl + backspace deletes until the beginning/end of the line.

New PSR-0/PSR-4 inspections

EAP 136.1672 introduced new inspections for mismatching namespace/name in class path, added further improvements to the @throws annotations from the previous EAP, included a filtered stack trace for PHPUnit and skipped or incomplete tests, added an “Add Field” intention for field assignments in constructors, and more.

On the Webstorm side, grunt now gives feedback on successful or unsuccessful builds, and you can edit JS documentation URLs (up until this point you could only add or remove them). Debugging-wise, breakpoints can now have groups and names, and they’re indicated in the right gutter as well.

Disable Drag & Drop

Mostly a fix edition, EAP 136.1768 adds the option to disable Drag and Drop in Project View – a feature that tends to get quite tedious when using unreliable input methods (trackpads and similar) or when jacked up on too much caffeine :) It also added a Restart button to Grunt’s console and some code folding improvements, allowing you to fold only “if” or only “else” in an if-else block, not the whole thing. Nothing major, in any case, but you can read the rest here.

Auto-create @var declarations in foreach statements

If you’re a stickler for well documented code like I am, you’ll appreciate the changes EAP 138.38 brings. This edition added the option to auto-generate @var declarations for temporary variables in foreach blocks – something I do manually every time I “foreach” just to get autocomplete help when using the variables in the loop. A small but very useful upgrade. A new intention was also added which replaces quotes with NOWDOC/HEREDOC. If you’re interested in bug fixes, see here.

Ability to open remote files by URL from the file that references them

EAP 138.84 was a fix release for a bug in the previous EAP release, and introduced a single useful new feature – files you open by URL can open files they reference in the source. For example, opening a remote URL, the source code of the file will load in the IDE. You can now find resources in said source code (CSS or JS, for example) and have them open by URL too, simply by CTRL+clicking them. The full issue is described here while the full release log is here.

Behat Support

EAP 138.184 was the first EAP to introduce initial Behat support. Tutorials about Behat, the behavior driven development framework for PHP, are coming soon on SitePoint. Behat configurations are configured in the same way PHPUnit’s are.

“Skip Into” was added for XDebug so you can skip certain functions when debugging, type inference for variables that implement ArrayIterator or Iterator was added for foreach loops, some new formatting options, option to collapse certain regions by default, and a new PhpDoc tag: @uses and @used-by, indicating usage of a file so PhpStorm knows, for example, to ask you about it before you tell it to delete it. Read the rest here.

In the next EAP, Behat support was improved further by adding intellisense, intentions to create DocBlocks were added, and an update block was introduced which checks for plugin compatibility before upgrading to a new major version of the IDE – something people had been clamoring for, especially those of us who use dozens of plugins and tend to see them break.



This list is far from exhaustive, but it contains what I consider the most important updates and new features. A new EAP is on its way, and when it’s released this article will be updated accordingly. Which of these features make you the happiest? Are you using the EAP versions and testing the novelties already, or are you more of a stable-release kind of developer?

  • Luís Ferreira

    Hacklang syntax support would be a good.

    • It’s in the making :)

      • Daniel Strøm

        Any ETA?

  • dojoVader

    Lovely IDE, for now can’t afford it till the next client pays :D

  • Drew Ewing

    Jetbrains: you’re not listening to your customers. We asked for Laravel and Hack support and you gave us what we wanted last year — Drupal and Behat.

    • At least they will finally support blade syntax. The only feature I miss so far (still a PHPStorm Noobie)

      • Darthjr

        Isn’t it still in progress? Or do they have blade highlighting (without hackery) now in EAP 8?

        • Jack Saat

          It’s not in the EAP 8 yet! But planned to be supported without hackery!

    • Darthjr

      @drewewing:disqus I can’t wait for “true” Laravel support (7 supported the command line tools or something lame). I’ve got a Magento/fuelphp hybrid waiting to be updated to a magento/laravel hybrid (why, because I can hahahahaha

    • @drewewing:disqus: you’re not listening to JetBrains. They have excellent forums asking for features (C’mon, how many companies seriously ask their customers for new features ? They do!), even with a democratic voting system. Hack and Laravel support have been requested a lot, so it will come when it’s finished. Hack itself is in a very early alpha stage and has been released just 2 months ago, so show some patience! It will come. As a dev you’ll probably understand that there’s some time between first request and stable public release.

      • @devmetal:disqus: I’m listening, they’re just not saying anything I’m interested in hearing. Blade support was overdue, Laravel has been blowing up for a while, and I feel like JetBrains dropped the ball with Laravel and Hack. And I’m not the only one. The only support that is needed initially for Hack is for the editor to recognize <?hh or .hh and refrain from codesniffing, and then display the output of hh_client. It's not a big ask and I feel like JetBrains has been giving it's users the run around. Here we are at the 5 month marker and still there's no support for Hack, despite a large number of requests.

  • gazugafan

    I just want to split the Project explorer, so that folders are in the top half and files are in the bottom (instead of all together, as they are now). It’s SO much easier to navigate, and I really miss that after switching from PhpEd.

  • ZAchary Initial Z

    well, I use v7, and also WebStrom 8.

    ANgularJS support is Great, but LiveEdit with it is so bad , this is might a bug.
    for PHP itself , PHPStorm is great,
    I’ve used Dw, Sublime,Aptana,Eclipse PHP, etc. but PHPStorm really excite me,.. #nowaytolookback

  • Ivan Panfilov

    just even more complicated bullshit IDE.
    srsly JetBrains, how about make simple IDE?

    • Jack Saat

      They got a open project from existing folder/files no setup needed you just open it and it does a lot of auto detecting to give you the right code hints

    • PHPStorm is extremely simple and made by usability experts. All features are optional. If you want it even simpler, then use a text editor. Where’s your problem? If you don’t like it, don’t use it.

      • Ivan Panfilov

        Of course, I use Sublime Text 2.
        Srsly. why i should use IDE which can not even run scripts without the setup and installation of the interpreter, mysql and web server.

        • Because these are the minimum requirements for these technologies to run. This is like complaining about “why should i use a computer that needs installation and electricity to run”.

          • Ivan Panfilov

            wow then is just like selling air, no shiet

  • “they’re just not saying anything I’m interested in hearing” .. You sound like a psycho. Do you even listen to yourself ? The world doesn’t turn around you by the way.

  • Andre Kruger

    As a newbie Laravel user the Blade support came just in time. I also like that they now support WordPress Themes development. Actually at this stage I can’t think of any additional features I need. The opening of a individual files, JIRA Issue support and the build in VCS means I don’t have to know GIT that well :) . Well done Jetbrains! and of course Sitepoint for all the great PHP news and tutorials!

  • Kaltstrom

    Just discovered Jetbrains is a Russian company and devs who made phpstorm and the rest of apps also Russian. Thumbs up.

Get the latest in PHP, once a week, for free.