PhpStorm 2017.3.1 EAP 173.3942

It’s a start of Early Access Program for PhpStorm 2017.3.1, a minor update for the recently released PhpStorm 2017.3. A fresh build 172.3942.13 is available here, in JetBrains Toolbox App or, if you have installed PhpStorm 2017.3 and have “Early Access Program” channel in Settings->System Settings->Updates, 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 takes on the latest improvements in IntelliJ Platform.

Continue reading

Posted in Early Access Program | Leave a comment

PHPUnit support enhancements

PhpStorm 2017.3 brings you several minor enhancements, allowing for more effective work with unit tests.

The new Undefined PHPUnit data provider inspection detects a method that you’ve specified via the @dataProvider annotation but have not declared in unit tests yet. You can quickly create the missing method by applying the suggested Create data provider quick-fix:

create_dataprovider

With the data provider method in place, you can fill it with the test data and run the test as usual:

run_tests

If some of your tests fail, which does happen from time to time, your only option in earlier PhpStorm versions was to re-run all of them together again. It indeed wasn’t very effective. With PhpStorm 2017.3 this process has been made easier, as you can run a test on a single data set.

Just select a test in the list, and re-run it:

rerun_test

Stay tuned for more updates and be sure to check out our series of videos on testing with PhpStorm!

Your JetBrains PhpStorm Team
The Drive to Develop

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

Test methods generation

PhpStorm 2017.3 makes it easier to create tests with all supported test frameworks.

Previously available for PHPUnit tests only, test file templates will now assist you in creating Codeception Unit, Codeception Functional, and PHPSpec Specification tests.

Continue reading

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

Bring exceptions under control

PhpStorm 2017.3 introduces several useful inspections and the corresponding quick-fixes for handling exceptions in your code.

Unhandled exception

Situations where executing your code will lead to a Fatal Error should be detected in advance and avoided. The new Unhandled exception inspection will help you with this by reporting exceptions that are not enclosed in a try-catch block, or that are not documented using the @throws tag. You can resolve the reported issues by using the provided Add @throws tag and the Surround with try-catch quick-fixes:

Unhandled_exception

Redundant @throws tag

When refactoring your code, it’s always a good idea to make sure that your changes are reflected in the PHPDoc block.

In earlier releases, the Missing @throws tag(s) inspection checked that all the exceptions thrown by a function had been documented. The new Redundant @throws tag inspection serves the same purpose, though by doing exactly the opposite: it detects tags for which no exceptions are present in the function, and suggests removing them.

Using the corresponding Remove @throws tag and Update PHPDoc Comment quick-fixes, you will clean up your PHPDoc in a breeze:

Update_phpdoc

Redundant catch clause

The new Redundant catch clause inspection will detect the situations in which the exception you are trying to catch is actually never thrown. Use the the corresponding Delete catch clause quick-fix to remove redundant catch blocks:

Redundant_catch

We hope that the new inspections will save you precious time and streamline your work with exceptions handling. If you need to customize the inspections’ severity level or define the scope they are applied to, navigate to Settings | Editor | Inspections and explore the PHP | Error handling and PHP | PHPDoc sections in the inspections list.

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Cool Feature, Newsletter | 17 Comments

PhpStorm 2017.3 is now released!

PhpStorm 2017.3, the next major update for PhpStorm, is now available! You can download it here or via JetBrains Toolbox App.

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

800x400_blog_PS_2017_3_Released

Editor-based 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 test
  • Test method generation
  • Rerun of failed PHPUnit test with specific dataset
  • “Undefined PHPUnit data provider” inspection

Improved Twig Support

  • Injections in Twig templates
  • Improved Twig formatting

Please see our issue tracker for the full list of fixed PHP-related issues, and release notes from all previous EAP builds.

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 revised Database view, SQL generator, JOIN statement completion, SSH tunneling and more.

For more details please see What’s New in PhpStorm 2017.3 and download a free 30-day PhpStorm trial for your operating system.

PhpStorm 2017.3 is available as a free update for everyone who has an active subscription for PhpStorm or All Products!

JetBrains PhpStorm Team
The Drive to Develop

Posted in Newsletter, Release Announcements | Tagged , | 42 Comments

Nullability support

PHP 7.1 introduced support for nullable types. When declaring a parameter or a return value, you can prepend its type with “?” to explicitly state that it is nullable. This way, you permit the NULL value to be passed or returned, besides the actual specified type.

PhpStorm has been supporting nullable types for some time now, and with version 2017.3, their support is enhanced even further.

Continue reading

Posted in Cool Feature, Newsletter | Leave a comment

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