Files and code generation enhancements

PhpStorm 2017.3 has a number of subtle, yet effective, enhancements to help you with your file and code generation.

PHP File templates

PhpStorm 2017.3 unifies the way you work with your PHP file templates. The New PHP Class dialog now picks your custom file templates too – in addition to the built-in Class, Interface, and Trait templates:

new-class-dialog

As a result, you get namespace auto-completion when creating a custom PHP class. In your template, you can make use of the ${NAMESPACE} variable, which will be substituted with the actual class namespace in the created file.

The include templates in PhpStorm 2017.3 now support the ${DATE}, ${TIME}, ${YEAR}, ${MONTH}, ${DAY}, ${HOUR} and ${MINUTE} variables.

Fields default visibility

To quickly initialize class fields in a constructor, PhpStorm provides you with the Initialize fields intention action. Prior to version 2017.3, all fields were generated as private. Now, you can bring this under control.

Navigate to Settings | Editor | Code Style | PHP. On the Code Generation tab, you will see the Fields Default Visibility option button, which allows you set the preferred visibility:

fields-default-visibility

This feature also works as part of the Change signature refactoring invoked on a constructor:

change-signature

If you select the Create and initialize class properties checkbox, class fields will be initialized according to the selected default visibility.

We hope you’re enjoying PhpStorm 2017.3. Stay tuned for more updates!

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Cool Feature, Newsletter | 1 Comment

PhpStorm 2017.3 Release Candidate is available

We are glad to announce that PhpStorm 2017.3 Release Candidate build 173.3727.84 is now available! If you want to learn all the details about the new features or to get yourself a copy to try right away, please visit our website.

splashPhpStorm_2017_3_RC

This build delivers new features, bug fixes and improvements for PHP and the Web, and takes on the latest improvements in IntelliJ Platform.

See the full list of bug-fixes and improvements list in our issue tracker and in the complete release notes.

For more information, please look at the overview of all PhpStorm 2017.3 features and download the build from PhpStorm website. A patch update is already available from the previous Public Preview build (PhpStorm 2017.3 EAP 173.3727.8).

If you have any feedback to share with us, please do so by commenting on this blog post, or in the issue tracker. Stay tuned as the PhpStorm 2017.3 release is just around the corner!

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Early Access Program, Newsletter | Tagged | 11 Comments

Composer Log

Composer is an indispensable tool; it has been integrated with PhpStorm since version 6.

Prior to version 2017.3, however, the messages from the Composer actions were shown in the Event Log together with all the other messages. When there were a lot of messages, you would have had to scan through them all, just to locate the relevant ones coming from Composer.

To help you with this, we’re introducing the dedicated Composer Log console.

Continue reading

Posted in Cool Feature, Newsletter | Tagged | Leave a comment

PhpStorm 2017.3 Public Preview

Today we released PhpStorm 2017.3 Public Preview, the next major update for PhpStorm!

You can download it here or via JetBrains Toolbox App. Try its new features, bug fixes and other important improvements. As usual, we’re eager to hear your feedback on it in comments to this post or in our public issue tracker.

Our website has all the details of this release, and here’s a roundup of the notable highlights.

splash_2xPhpStorm_2017_3_Public_Preview

REST Client

  • New REST client interface
  • Support for environment variables
  • Compare your requests

PHP Language

  • Performance improvements
  • Support for nullability in refactoring
  • Improved code templates

Bring exceptions under control

  • Unhandled exception inspection and quick fixes
  • Redundant @throws tag inspection and quick fixes
  • Redundant catch clause inspection and quick fixes

Testing

  • Create new Codeception and PHPSpec tests
  • Test method generation
  • Undefined PHPUnit data provider

Twig

  • Injections in Twig templates
  • Improved Twig formatting

Please see our issue tracker for the full list of PHP-related issues fixed and release notes from the current EAP build.

PhpStorm 2017.3 also brings major improvements in its support for web technologies, such as improved Vue.js support, improved code completion and documentation for JavaScript and DOM APIs, Pull Member Up refactoring and much more.

IntelliJ Platform has provided this release with lots of new features as well as bug-fixes. Specifically, in Version Control you can now switch between branches while preserving your workspace, rename changelists directly in the Shelf tab, drag and drop changelists between Shelf and Local Changes tabs, and even more.

Database tools have been improved with Improved Database view, SQL generator, JOIN statement completion, SSH tunneling and more.

Please look at the overview of all PhpStorm 2017.3 features and download the build from the PhpStorm website. A patch update is already available from the previous EAP build (PhpStorm 2017.3 EAP 173.3622.27).

If you have any feedback to share with us, please leave your comments to this blog post or in our public issue tracker. Stay tuned as the PhpStorm 2017.3 release is just around the corner!

JetBrains PhpStorm Team
The Drive to Develop

Posted in Early Access Program, Newsletter | 11 Comments

PHP Annotated Monthly – November 2017

PHP Annotated Monthly Logo

PHP Annotated Monthly collects all the interesting articles from the month in one convenient place. Collected and curated by Gary Hockin, Developer Advocate for PhpStorm.

Continue reading

Posted in PHP Annotated Monthly | Tagged , , , | 1 Comment

PhpStorm 2017.3 EAP 173.3622.27

The new PhpStorm 2017.3 EAP build (173.3622.27) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.3531.17) installed, you should soon get a notification in the IDE about a patch update.

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Generation of nullable return and parameter types

We continue our work on PHP 7.1 support, and in this EAP we’ve improved the generation of getters/setters as well as constructors. PhpStorm will now add nullability to the parameter and return types if you have PHP Language Level set to 7.1 or above. Besides, the void return type is now generated for setters.

nullable

Apart from new features, this build has many bug fixes, including this:

  • Indent code in PHP tags adds extra indent after namespace declaration (WI-38360)
  • Subclass constructor incorrectly inferring argument type from parent (WI-29304)
  • @see tag doesn’t support namespaced functions and constants (WI-33015)
  • ES6 implementation of JSDoc defined interface (WEB-19755)

See the full list of bug-fixes and improvements in our issue tracker and the complete release notes.

Download PhpStorm 2017.3 EAP 173.3622 for your platform from the project EAP page or click “Update” in your JetBrains Toolbox App. And please do report any bugs and feature request to our Issue Tracker.

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Early Access Program, Newsletter | 7 Comments

Power Save Mode in PhpStorm

It is no secret that PhpStorm’s CPU usage can be quite high at times. This is primarily caused by various code insight features including auto-completion, syntax errors checking, intention actions and on-the-fly inspections. These processes are always running in the background and can be CPU-intensive.

When the CPU performance is a bottleneck, or if you work on a laptop without a power supply and want to get several extra hours of battery life, PhpStorm has got you covered.

Continue reading

Posted in Cool Feature, Newsletter | Leave a comment

PhpStorm 2017.3 EAP 173.3531.17

The new PhpStorm 2017.3 EAP build (173.3531.17) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.3415.21) installed, you should soon get a notification in the IDE about a patch update.

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Reorganized PHP Code Style settings page

PhpStorm has a lot of different Code Style options and it’s not always easy to find them. To simplify the task, we’ve reorganized PHP Code Style page by adding new tabs – Code Conversion and Code Generation and moving all options from Other tab to the corresponding pages.

Since Blank line before return has been moved to Blank Lines tab for consistency and now allows integer instead of true/false values the setting won’t be migrated for EAP to EAP upgrade and should be changed manually. For Release to EAP upgrade, all settings should be migrated.

settings_code_style

Apart from new features, this build has many bug fixes, including this:

  • Invalid descendent file name “ssh:” or directory a\b (on Linux) (WI-2449)

See the full list of bug-fixes and improvements in our issue tracker and the complete release notes.

Download PhpStorm 2017.3 EAP 173.3531 for your platform from the project EAP page or click “Update” in your JetBrains Toolbox App. And please do report any bugs and feature request to our Issue Tracker.

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Early Access Program | 11 Comments

PhpStorm 2017.3 EAP 173.3415.21

The new PhpStorm 2017.3 EAP build (173.3415.21) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.3302.10) installed, you should soon get a notification in the IDE about a patch update.

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Code Templates for test methods

In this build, we’ve added Code Templates for PHPUnit, Codeception, and PHPSpec test methods (File | Settings | Editor | File and Code Templates). Combining this with the feature “Test methods generation” you can now fast and easily create boilerplate code for your test using PhpStorm.

Method templates support ${NAME} (name of the tested method) and ${TESTED_NAME} (name of the tested class) variables but we’re going to add other variables for greater flexibility.

test_method_templates

Apart from new features, this build has many bug fixes, including these:

  • Wrong error message “Built-in HTTP Server on custom port disabled” (WEB-11110)
  • Adding PHPDoc To Property – Extra Space (WI-18468)

See the full list of bug-fixes and improvements in our issue tracker and the complete release notes.

Download PhpStorm 2017.3 EAP 173.3415 for your platform from the project EAP page or click “Update” in your JetBrains Toolbox App. And please do report any bugs and feature request to our Issue Tracker.

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Early Access Program, Newsletter | 2 Comments

Videos: Testing with PhpStorm

PhpStorm supports all the major PHP testing frameworks: PHPUnit, Codeception, Behat, and PHPSpec.

Recently we’ve published a series of short videos about running PHPUnit and Codeception tests in PhpStorm. The videos guide you through the PHPUnit and Codeception setup process and show you how to work with test results.

This process is generally the same whichever testing framework or PHP interpreter you choose. First, configure a PHP interpreter. Second, configure the testing framework. Third, create a dedicated run configuration for the selected test framework, and finally run it.

Continue reading

Posted in Cool Feature | Leave a comment