What’s New in PhpStorm 2016.2
This is the second update in the series of the releases planned for 2016. Take advantage of even better code understanding, top-notch coding assistance, and support for all major tools and frameworks.
This is the second update in the series of the releases planned for 2016. Take advantage of even better code understanding, top-notch coding assistance, and support for all major tools and frameworks.
Major improvements were made in type inference:
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.
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.
If language level is set to PHP 7 or higher, PhpStorm will generate getters and setters with return type and scalar parameter type hint.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
Version Control comes with the following changes:
PhpStorm 2016.2 borrows from the platform great UI improvements, such as:
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 have been improved thanks to our colleagues on the JetBrains DataGrip team: