What’s New in PhpStorm 2016.3

Experience The Drive to Develop with new major update of PhpStorm in 2016

Tools and Frameworks

Docker in Remote Interpreters

Support of Docker in Remote Interpreters

Now Docker can be added as a remote PHP interpreter in PhpStorm. It’s easier than ever to set up the development environment with Docker and start PHP Scripts, PHPUnit, Behat, PhpSpec tests, PHP CodeSniffer or PHP Mess Detector inside Docker containers.

PHPSpec support

PHPSpec support

PhpStorm 2016.3 adds support for PHPSpec. Now when you are working with PHPSpec in PhpStorm, you will have code completion, navigation and proper inspections helping you work with code. We’ve also added PHPSpec run configurations, so you can run your PHPSpec easily with PhpStorm.

Auto-detection and configuration of PHPUnit, Behat, PHPSpec

Auto-detection and configuration of PHPUnit, Behat, PHPSpec

Setting up PHPUnit, Behat and PhpSpec for your project becomes incredibly easy. Now these test frameworks will be detected from composer.json, and you will get a popup tooltip suggesting to configure them automatically.

PHP Language & Editing Experience

Semantic highlighting for variables and parameters

Semantic highlighting for variables and parameters

Semantic highlighting, previously introduced in KDevelop and some other IDEs, is now available in PhpStorm. It extends standard syntax highlighting with unique colors for each parameter and local variable. You can turn this feature on at Settings|Editor|Colors and Fonts|Language Defaults|Semantic highlighting.

Сompletion of overridden methods and fields

Сompletion of overridden methods and fields

In PhpStorm 2016.3 you can complete overridden methods and fields without function and var keywords. After invoking completion you will see a method and a field available to override.

Improved support of PSR-0/PSR-4

Improved support of PSR-0/PSR-4

Create new test and Create new class have been improved: now they take into account PSR-0/PSR-4 and allow generation of new folders. Also, if you have a folder marked as Test Source Root, it will be picked up automatically in the directory field while creating a new test.

Improved support of PSR-0/PSR-4

Support of class_alias

PhpStorm 2016.3 brings a support of class_alias, which is now defined in PhpStorm and works in accordance with PHP documentation.

Code Quality Analysis

Project wide PHP 7 strict types

Project wide PHP 7 strict types

The Missing Strict Types Declaration inspection checks whether the declare is present in a file. It gives a warning when declare(strict_types=1); is missing as the first line of the file. Then a related intention allows you to fix this across the whole project, which is especially handy while converting a whole project to PHP 7 with enabled strict types.

PHP 7 Support in PhpStorm

New naming convention inspections

New naming convention inspections

In PhpStorm 2016.3 we’ve added a pack of new inspections for code style. These inspections highlight those classes/function/methods/variables-constants which don’t follow naming convention in current project.

error prevention

Improved Runtime Error Prevention

In PhpStorm 2016.3 the runtime error prevention has been reworked significantly. It became much smarter and in many cases where PhpStorm was previously unable to detect errors, now you will be notified about it by highlighting the code without even running the code.

IDE Improvements

Ability to open several PhpStorm projects in one frame

Opening multiple projects in one frame

In PhpStorm 2016.3 it becomes possible to open several projects in one frame by attaching/detaching a project to/from the current one. This means you can work with multiple projects without window-switching and performs cross-project refactorings.

Version Control

Version Control

Version Control comes with the following changes:

  • Improved ergonomics and speed of VCS Log
  • The Merge dialog now shows a Resolve icon on the left side of the Editor when the IDE is capable of resolving the conflict automatically
  • Syntax highlighting enabled in the Diff and Merge dialogs
  • An interface for managing Git remotes in the project

Top-notch Web Technologies

Flow

Flow support

You can now see type errors reported by Flow, a static type checking system, right in the PhpStorm editor as you work with your code, without having to save files. You can also use code completion results provided by Flow.

TypeScript

Better TypeScript Support

TypeScript code analysis and completion are now powered by the TypeScript language service, thanks to which the errors reported in the editor are now consistent with the compiler. PhpStorm also provides additional powerful refactorings and intentions.

Stylelint

Stylelint

Don’t miss any errors in your stylesheets thanks to integration with Stylelint, a CSS linter. In addition to the built-in PhpStorm inspections, you can now see the errors reported by Stylelint right in the editor.

As usual, all features and improvements of WebStorm are available in PhpStorm either out of the box or with free plugins available in the repository. Other noteworthy web-related features include improved React support, support for jspm imports, Convert to arrow function to help you to upgrade your code to ECMAScript 6, and more.

Database Tools

Improvements in Database tools

Improvements in Database tools

Database tools in PhpStorm have been improved thanks to our colleagues on the JetBrains DataGrip team:

  • Possibility to edit several similar cells at once
  • Integration with mysqldump and pg_dump utilities
  • Now changes made in the Table Editor are stored locally and submitted in bulk (via Ctrl+Enter). Not submitted yet changes can be canceled via Ctrl+Z.

Other improvements:

  • Codeigniter Code Style
  • Support of directories in PHP UML
  • New setting to select variable name without ‘$’ on double click
  • Support of list() and array of objects
  • Improvements in anonymous classes support
  • Code Style Settings for PHP 7 return types
  • New extension point that allows to provide PHP files into projects
  • Improvements in external libraries
Learn about PhpStorm 2016.2

Better PHP Language Support

Improved type inference

Improved type inference

Major improvements were made in type inference:

  • Type inference of array elements from PHP array functions
  • Extended type of already inferred variables instead of rewriting
  • Type inference for elements and keys of Iterator and IteratorAggregate implementators
  • Improved PhpStorm advanced metadata
Strict type inspection for PHP 7

Strict type inspection

In PhpStorm 2016.2 we’ve added a new strict type inspection for PHP 7. With this type hinting support, PHP 7 support in PhpStorm gets even better.

Read more about PHP 7 Strict Type Inspection

Improved parsing of PHP 7 and PHP 7.1

Improved parsing

Parsing for PHP 7 and PHP 7.1 has been significantly improved. We’ve added support for PHP 7 Uniform Syntax. Moreover, PHP 7.1 is now supported, including support of visibility modifiers for class constants, keys in the list() construct, null return types and nullable arguments, and multiple catch exceptions.

Improved getters and setters generation

Improved getters and setters generation

If language level is set to PHP 7 or higher, PhpStorm will generate getters and setters with return type and scalar parameter type hint.

New Editing Experience

Completion Improvements

New completion features

A new dynamic live template was added to make completing the parameters passed into functions, methods, or class constructors easier. Values of class constants are now shown in the completion lists, and static methods are filtered out from the completion lists.

Read more about parameter code completion

Smart Type Code Completion

Smart type code completion

Smart Type code completion filters the suggestion list and includes only those types that are applicable to the current context. You can invoke it by pressing Ctrl+Shift+Space.

Read more about completion changes

Various @throws improvements

Various @throws improvements

In PhpStorm 2016.2 you will find a new option to analyze more than one call level for @throws generation and inspection. Also, you now have one unified setting which controls both generation as well as inspection for @throws tags.

Read more about @throws improvements

Code Quality Analysis

Import Cleanup Improvements

Unused imports inspection

In PhpStorm 2016.2 we have completely reworked inspection of unused imports that now includes support for namespaces, functions and constants, and added other enhancements.

Read more about Unused Imports Inspection

Return Type Inspection

Return type inspection

Now if a declaration of a return type in phpDoc isn’t compatible with the actual return type of a method or a function, the IDE will alert you to this. Return type can now be changed with an automatic quick-fix.

Dynamic Call to Static Method Inspection

Dynamic call to static method inspection

PhpStorm 2016.2 brings a new inspection for calling a static method in a dynamic manner (via -> instead of ::). A new quick, Make call static, was added to make this inspection more helpful for you. This feature is switched off by default; to start using it, adjust the setting at Preferences | Editor | Inspections | Static method called as dynamic.

Frameworks, Tools, and more

Template Projects

Template projects

In PhpStorm 2016.2, you can save any project as a template and create a new one based on it. The Tools menu has a new action, Save Project as Template. As soon as it’s saved, the Template is available as a user-defined template in the New Project window.

Read more about Template Projects

Joomla Support

Joomla! support

In PhpStorm 2016.2, we’ve added support for Joomla! Framework. PhpStorm now bundles the Joomla! Plugin providing many Joomla!-specific features, such as Joomla! Code Style, support for JHtml::_($argument) and JText::_($argument), database prefix support, and more. You can easily add Joomla! Support to your existing project or create a new Joomla! Module/Plugin/Extension right from the Welcome screen.

On demand load of Debug Extension for CLI configurations

Xdebug on demand for CLI PHP scripts

In PhpStorm 2016.2 you can load a Debug Extension for CLI on demand, e.g. when Debugger/Code coverage is required. This dramatically increases execution speed, by a factor of 2 to 3 in specific cases.

Read more about Xdebug on demand for CLI PHP scripts

Top-notch Web Technologies

TypeScript 2.0 support

TypeScript 2.0 support

PhpStorm 2016.2 brings support for many features of TypeScript 2.0: optional class members, readonly property, never type, this function type, global module export declaration, resolve for type declarations in @types folder, path mappings based module resolution, and more.

Angular CLI and code snippets

Angular CLI and code snippets

Thanks to the integration with Angular CLI, you can now create new Angular 2 projects from the IDE Welcome screen. And with a collection of Angular 2 Live templates, you’ll have the most used code snippets at your fingertips.

Drag files into HTML

Drag files into HTML

Drag an image to add an img tag with width and height attributes anywhere inside the body tag. Similarly, drag a JavaScript or CSS file into the opened HTML file, and PhpStorm will automatically create a script or a link tag inside the head tag for you.

As usual, all features and improvements of WebStorm are available in PhpStorm either out of the box or with free plugins available in the repository. Other noteworthy web-related features include improved React support, support for jspm imports, Convert to arrow function to help you to upgrade your code to ECMAScript 6, and more.

IDE improvements

Version Control

Version control

Version Control comes with the following changes:

  • Improvements in working with patches
  • Commit dialog now shows unversioned files
  • Case only rename for Git
  • Improved Git/Mercurial Log Viewer
UI Improvements

UI improvements

PhpStorm 2016.2 borrows from the platform great UI improvements, such as:

  • Watches view has been merged with Variables
  • Redesigned Inspection tool window
  • Better notifications
  • Set Background Image action
Support for fonts with ligatures

Support for fonts with ligatures

The editor in PhpStorm now supports fonts with programming ligatures, like Fira Code, Monoid or Hasklig. Make sure you enable that in Preferences | Editor | Colors and Fonts | Font.

Database Tools

database improvements

Database tools improvements

Database tools have been improved thanks to our colleagues on the JetBrains DataGrip team:

  • CSV files import
  • Language injections
  • Improved table editor

Learn more