What’s New in PhpStorm 2017.1

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

Tools and Frameworks

Support of Codeception testing framework

Support for the Codeception testing framework

PhpStorm now supports the Codeception testing framework, starting with version 2.2.0. You can install it from Composer or PHAR. Run Configuration will help you run your tests locally, on a Vagrant machine, remote interpreter, or Docker.

Read more..

Support of PHPUnit 6

Support for PHPUnit 6

PHPUnit 6 was released just recently, and now we are bringing support for it in PhpStorm. The new namespaced TestCase class is now recognized and supported by PhpStorm.

Read more..

Blade Support Improvements

Blade support improvements

Good news for Laravel developers: PHPDoc in Blade injections is now supported. You can provide the type of variable inside a template to get code completion. Other improvements include support for @includeWhen, @component, and @slot directives, which are now nested in the document structure.

Read more..

Joomla! Support

Improved Joomla! Support 2017.1.1

In addition to other Joomla! Support features, we’ve added initial support for JDatabaseQuery and JDatabaseDriver. When working with these classes, you will now get completion for tables and columns, as well as inspections, SQL highlighting, and table/columns resolve.

Editing Experience

Parameter Hints

Parameter hints

Thanks to Parameter hints in PhpStorm, code becomes more readable and easier to understand. Parameter hints are now showed for literals and nulls used as method arguments, helping you better understand the semantics of specific methods. We've also added an option to customize your inline parameter hints to fit your IDE color scheme.

Read more..

2017.1.1 New option is added to always show parameter name hints independent on the statement that expresses the parameter value.

PSR-0 Support

Better support of PSR-0 and Rename refactoring

Now if you use Rename refactoring for a directory in PSR-0 root, it also changes the namespace of your class, and vice versa, when you rename a namespace. In addition, the Rename Class refactoring renames child classes and their files as appropriate.

Recognition of PHP class names in strings

Recognition of PHP class names in strings

PhpStorm 2017.1 recognizes PHP class names in strings. Class references will be now added to string literals in single quotes that will help you maintain the correct names in the Rename refactoring and navigate to classes more quickly.

Improved PHP Formatting

Improved PHP formatting

PhpStorm 2017.1 brings several new useful code style options, such as:

  • Configurable spaces inside declare statements
  • Place ‘()’ for constructor
  • Convert else if/elseif to
  • Blank lines before namespace

Read more..

Improvements in Auto-Import Functionality

Auto-import of functions and constants

Auto-import of functions and constants

PhpStorm 2017.1 can now automatically import functions and constants. To take advantage of this, go to in Settings | Editor | General | Auto Import | PHP and select Enable auto-import in file scope and/or Enable auto-import in namespace scope.

Auto-import from global namespace

Auto-import from global namespace

As an alternative to auto-importing functions and constants from the global namespace, you can ask the IDE to use global references. You can find this option in Settings | Editor | General | Auto Import | PHP | Prepend functions and constants from the global space with ‘\’.

PHP Language Support

Full support of PHP 7 Uniform Variable Syntax

Full support of PHP 7 Uniform Variable Syntax

PhpStorm 2017.1 brings improvements for PHP 7 Uniform Variable Syntax in accordance with PHP RFC: Uniform Variable Syntax. Expressions such as isset/unset, foo()()().., and $some->foo()() style calls are now supported.

PHP 7.1: Improved support for anonymous classes

PHP 7.1: Improved support for anonymous classes

We’ve added support for anonymous classes, which now have a proper type, meaning that methods of anonymous classes will be correctly resolved. This unleashes the full power of PhpStorm, including Code Inspections, Find Usages, Rename Refactoring, Navigate to Declaration and more.

New code highlights

New code highlights

PhpStorm 2017.1 brings new highlighting of all extended/implemented methods, places where an import is used, and places where an exception is thrown (for try, catch, and @throws). This way your code is more visual, and it’s easier to grasp the important details. To use this feature, simply place the caret on extends, implements, use, catch or @throws.

Extended PHP Runtime Configuration

Configurable PHP runtime

In PhpStorm 2017.1 it is possible to configure which PHP extensions are used in the project. It will help to keep completion lists neat and containing only relevant items.

Read more..

2017.1.1 Disabled extension stubs which are actually used in a project are automatically detected and can be fixed with a quick-fix.

Recursion detection

Recursion detection 2017.1.1

Now when there’s recursion in your code, it will be automatically detected and marked with a special symbol on the left side panel.

Code Quality Analysis

Detect and convert PHP 4 style constructors to PHP 5.3+

Detect and convert PHP 4 style constructors to PHP 5.3+

Since PHP 4 constructors have been deprecated in PHP 7, we’ve added a new inspection to help detect and convert such constructors to PHP 5.3+ style –__construct. You can also press Alt+Enter for a related quick-fix.

Read more..

New quick-fix for undefined variables

New quick-fix for undefined variables

New quick-fix was added to help to resolve undefined variables by declaring it as imported in closure.

PHP Debugging

Grouping of user-defined constants in Debugger

Grouping of user-defined constants in Debugger

Now all user-defined constants are grouped under the Constants node in the list of variables, which helps reduce the noise and keep the list of variables neat.

Read more..

Allow choosing IP to be sent to Zend Debugger

Allow choosing IP to be sent to Zend Debugger

PhpStorm 2017.1 automatically detects all host IPs to sent them to Zend Debugger. This is especially important when working on a machine with multiple IPs, e.g. if you use Vagrant/VirtualBox/VPN. You can also disable the check-box and provide required IPs manually. The option can be found in Settings|PHP | Debug | Automatically detect IDE IP.

Possibility to skip files in step debugging

Skip files in step debugging 2017.1.1

Now you can skip files when Stepping Into (F7) during debugging. It might be especially useful when working with large frameworks where skipping core files during step debugging can save a lot of time. Enable the option in Settings | Languages & Frameworks | Debug | Step Filters.

Top-notch Web Technologies

Flow

Vue.js support

Enjoy coding assistance for Vue template language and the language of your choice in the script and style blocks of a .vue file. The IDE automatically completes Vue components and adds required imports for them. And we’re just getting started!

Integration with Jest

Integration with Jest

Thanks to the new integration with Jest, you can now run Jest tests from the IDE, see test results in a handy treeview, easily navigate to the test source from there, and also debug Jest tests.

Completion for modules in package.json

Completion for modules in package.json

PhpStorm now suggests package names in the project’s package.json file, and shows descriptions and latest versions for them.

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 upgrade your code to ECMAScript 6, and more.

IDE Improvements

Version Control

Version control

Version control comes with the following changes:

  • Updated Log viewer for Git and Mercurial
  • New option called Ignore imports and formatting in the Diff dialog
  • Faster File History performance for Git
Ability to open several PhpStorm projects in one frame

Search in Find in Path

The Find in Path dialog, which earlier received a Preview tab, has been reworked from the ground up and now shows instant results in the first place. What is more important, now you can open any selected result in the Editor simply by pressing Enter. To see results in the tool window, either click the button at the bottom or press Ctrl+Enter (Cmd-Enter for Mac OS X).

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:

  • Better schema management in the Data Sources and Drivers dialog
  • Сolumns mapping and DDL preview in CSV import
  • Drag-n-drop for exporting/importing tables

Learn more..

Other improvements:

  • Drag’n’Drop to/from Remote Host copies files instead of moving
  • Support for function/constant/namespace aliases in unused imports
  • Support for emoji in the editor
  • Auto import for React components
  • New Copy Type and Jump to Type Source actions from the Debugger Variables View
  • Option to ignore imports and formatting in the Diff dialog
Learn about PhpStorm 2016.3

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 projects from the IDE Welcome screen. And with a collection of Angular 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