What’s New in PhpStorm 2017.2
- New Composer actions - Now you can execute the actions Update Dependencies, Install Dependencies, Remove Dependencies, and Self-update directly from the IDE, without having to switch to the command line.
- PhpStorm and composer.json settings synchronization - Since composer.json contains the most up-to-date information about project, the synchronization of new settings between PhpStorm and composer.json ensures that PHP Language Level, PhpStorm Source and Test folders exactly match the project settings and structure specified in composer.json. This significantly simplifies project configuration in PhpStorm.
- Seamless work with composer global installation - Now you can use globally installed composer. PhpStorm detects whether you have it installed and simplifies project creation in case you do. You can also set globally installed composer for existing projects and make it default for all projects. All this will save you time that you spent on looking for the previously downloaded composer.phar or on downloading yet again composer.phar into the project.
PHP Language Support
- Docker Compose - PHP interpreter based on Docker Compose is now supported in PhpStorm. Now you don’t have to duplicate all settings, such as volumes, networks, environment variables, and others, from docker-compose.yml to PhpStorm. Docker Compose based interpreter includes all the familiar features of remote interpreters, so you can run/debug PHP code, and execute/debug PHPUnit, Codeception, Behat and PHPSpec tests.
- Detection of enabled/disabled extensions for PHP interpreter - In the previous PhpStorm release, we made it possible to configure which PHP extensions are used in the project. We’ve now added automatic detection of enabled/disabled extensions from the selected PHP interpreter. This will help you synchronize your project extension settings and extensions that are actually installed in your PHP distributive. The feature works for local PHP interpreters and for all types of remote ones as well.
- Preserve state of Start Listening for PHP Debug Connection option - In PhpStorm 2017.2, if you had Start Listening for PHP Debug Connection enabled in a project, the option will be restored on project reopening. This will help you avoid situations where debugging doesn’t work because you forgot to enable the option.
- Reworked polymorphic types support - We’ve completely reworked support for polymorphic types, such as $this, static, self and parent. This fixes many related issues, for instance, missing type in chain call if a method has a double return type, lost type with new static() call if method from base class returns $this, returning self in traits not resolved correctly, and many others. In addition, we’ve improved support for composed traits.
- Better refactoring for PHP 7/7.1 - PhpStorm 2017.2 brings better refactoring for PHP 7/7.1. In particular, return types are now supported for the Change Signature refactoring, and the Extract Constant refactoring now allows you to use visibility level for constants.
- $this highlighting - In PhpStorm 2017.2, when you place your caret on $this, PhpStorm highlights all usages of this variable across the whole class. It can be extremely helpful as you can easily see all the usages of the variable.
- New inspections - PhpStorm 2017.2 bring new handy inspections, such as
- Statement has empty body inspection
- Usage of strict_types declaration for PHP 7 and higher
- Method declaration of super class is incompatible with implemented interface
Improved PHP Formatting
- Automatically run PHPUnit tests - In PhpStorm 2017.2, you can re-run PHPUnit tests automatically with a specified delay. Enable auto-run for a particular configuration, set the delay value, and your tests will be re-run automatically with that delay after you stop editing a file.
- Unified Test Frameworks settings - We continue to simplify and unify PhpStorm settings. In this small but pleasant update, PHPUnit, Behat, PHPSpec, and Codeception testing frameworks have a single settings page.
Web Technologies Support
- New formatting options - PhpStorm 2017.2 brings new useful code style options:
- Spaces around null coalescing operator
- New formatter options for blank lines
- New parenthesis options for if statements
- Separate option for brace placement for closures
- New Return type on new line option
- As usual, all the 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 support for Angular Material, parameter hints and type info in TypeScript, move symbol refactoring, and other.
- Version control - Version control comes with the following changes:
- Reverting and rewording commits
- Formatting commit messages
- Reworked Shelf
- Find in Path improvements - The Preview panel in Find in Path now has a “gutter” – a left-side pane like that in the editor – with line numbers, navigation icons, and local change markers. In addition, search results from the same lines are now merged together.
- Pause indexing - The indexing process now can be paused, for instance, if you need your CPU power for an urgent task.
- Improvements in database tools - Database tools in PhpStorm have been improved thanks to our colleagues on the JetBrains DataGrip team:
- Several databases in one PostgreSQL data source
- Get notified when a large query is finished
- Transaction Control
- Unified settings for PHP frameworks
- SSH-Agent support
- Create new field/method actions for PHP UML diagrams
- Better HiDPI support