Just yesterday a new version of PhpStorm was released , the second this year. I hope that neither our IDE, nor the JetBrains company need a separate presentation on Habrรฉ, so Iโll go straight to the main changes. By the way, in order not to waste time, you can put a trial 30-day version on download and read on. Go!
')
Improved PHP language support
PhpStorm has learned to better output types ( type inference ) of arrays and iterators. The type of variables is now specified from the code, for example, when using the instanceof operator. Also improvements touched .phpstorm.meta.php .
Added inspection for strict PHP 7 type checking. Presence of declare directive in code (strict_types = 1); PhpStorm will warn about the appropriate TypeError errors. You can read more about it in our blog in English.
Improvements touched and parsing. In particular, there is support for universal syntax for working with variables. Innovation is support for PHP 7.1 , which is expected to be released at the end of this year.
Accessors generation now supports argument types and return type. The language level in the project must be PHP 7 or higher.
Easy editing
The values โโof the constants are shown in the list of auto-completion next to their names. Static methods are filtered when you first call autocompletion in a dynamic context, but pressing Ctrl + Space returns everything as it was ( hello , PHPUnit ).
Added a dynamic template for auto-completion of parameters of functions, methods and constructors. It can be called either using the params keyword from the auto-completion list, or automatically when inserting a function (must be enabled separately in Settings: Settings โ Editor โ General โ Smart Keys โ Enable smart function parameters completion ).
The IDE now supports smart type code completion ( Smart Type Code Completion ). Pressing Ctrl + Shift + Space will leave in the list of autocompletion only elements whose type corresponds to the context. The context type is also taken into account when sorting the list.
Unified generation and validation of the PHPDoc@throws tag. The corresponding settings now live at the new address Settings โ Editor โ Code Style โ PHP โ PHPDoc and allow you to select the depth of the call tree analysis. A little more detail here (in English).
Code Quality Analysis
Imports of not only classes, but also functions, constants, and namespaces can now be marked as unused. They will be deleted when formatting the code if the Optimize imports option is enabled .
In addition to the strict type checking, PhpStorm has acquired an inspection to check the type of the return value of the function. It runs at any installed language level and takes into account not only the signature of the function, but also the PHPDoc tag @return .
Another new inspection reports on cases where the static method is called using โ -> โ. It is turned off by default, because PHPUnit (see above). You can enable it here: Settings โ Editor โ Inspections โ Static method called as dynamic .
Frameworks and tools
PhpStorm 2016.2 allows you to save an arbitrary project as a template ( Tools โ Save Project as Template ... ), to later use it when creating a new project ( File โ New Project ... ).
The IDE now comes with a new plugin that adds support for Joomla! . Namely: code style, JHtml :: _ ($ argument) , JText :: _ ($ argument) , database prefix and so on.
In order to improve the performance of the interpreter, PhpStorm allows you to enable Xdebug only on demand, a post in support (in English).
Modern web technologies
As usual, PhpStorm 2016.2 includes all the improvements of WebStorm 2016.2 immediately or with the help of plug-ins. For example, TypeScript 2.0 .
Added support for Angular CLI and code snippets ( code snippets , they are also live templates ) for Angular 2 .
Images, JavaScript files and CSS files can now be dragged with the mouse into an open HTML file, and the corresponding tag will be inserted automatically.
New features and enhancements IntelliJ Platform
Work with patches, an improved Log tab for Git and Mercurial, and other changes related to version control systems have already been described on Habrรฉ and are available in the newest version of IDE.
The UI has undergone a series of evolutionary changes. For example, we combined the Watches tab with the Variables tab in the debugger; notifications moved to the lower right corner and grouped by type; and now you can set an arbitrary image of the background of the editor.
The IDE is now able to make ligatures. Just download and install the appropriate font (for example, FiraCode ), then enable the corresponding option in Settings โ Editor โ Colors & Fonts โ Font (the Enable font ligatures checkbox ).
Thanks to our colleagues from the DataGrip team, database support in PhpStorm has also been improved. Meet the autocompletion of database names in the Data Source and Drivers settings dialog, context-sensitive SQL autocompletion and much more.
Finally
We have prepared a video (in English), showing all the changes and improvements:
A free upgrade to version 2016.2 is available to anyone who has an active subscription to PhpStorm or All Products.