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 | 10 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 | 5 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 | 10 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

PhpStorm 2017.3. EAP 173.3302.10

The new PhpStorm 2017.3 EAP build (173.3302.10) 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.3188.26) 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.

REST Client: Support environment variables

This build brings the support of environment variables for our new REST client. Now you can easily switch between different environments, e.g. production, testing, development.

Environment variables can be defined in rest-client.env.json file, that should be stored inside the project. If a variable is not defined in the environment file, the variable text will be sent instead, (e.g. “{{unresolved-var}}”). An environment variable name should consist of letters, digits, underscore sign ( _ ) or hyphen sign (-). It can be used in request host, port, path, query parameter or value, header value. See related issues for current limitations: WEB-28638

Current environment can be chosen on execution. The previously used environment should appear at the beginning of the execution options and will be used for ‘Structure View’ and ‘Open in browser’ actions.

request_with_env

Let’s look at the specific example. We create rest-client.env.json with the content:

Then we create test.http file:

Now when we run the request using dev environment we get:

From the platform side the update brings:

  • Vue.js is now bundled in PhpStorm
  • Databases: Support Postgres Foreign Data Wrappers (DBE-1865)
  • Databases: Group Data Sources by folder (DBE-77)

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

Download PhpStorm 2017.3 EAP 173.3302 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

PhpStorm 2017.3 EAP 173.3188.26

The new PhpStorm 2017.3 EAP build (173.3188.26) 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.2941.8) 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.

Twig Formatting

This build brings improved Twig formatting that can now handle complex structures and provide correct indentations for them.

twig_formatter_2

Injections in Twig templates

In this build, we’ve implemented language injections for Twig custom tags and named blocks. To inject a language into named block or between custom tags, place caret inside {% customTag %} or {% block block_name %}, press Alt+Enter and select Inject language.

You can also create permanent injection rules in Settings|Editor|Language Injections by addition of Generic Twig rule. Just take a look at two predefined rules: block javascript and custom statement javascript.

twig_inject_3

Custom templates in Create New PHP Class dialog

To simplify the creation of different classes in a namespaced code we’ve extended New PHP Class dialog with the ability to select a custom PHP file template. That allows you to use ${NAMESPACE} variable in your template and take advantage of namespace completion and PSR-0/PSR-4 namespace detection during the creation of the class.

custom_class_template_2

Test methods generation

To avoid manual creation of test methods, we’ve implemented a method selector in Create New PHP Test dialog. You can select all, or just a couple of class method for which you’re going to provide tests and PhpStorm will generate you the test class and the test methods stubs.

new_tests

Codeception test generation

In addition to PHPUnit and PHPSpec tests, we’ve added Codeception Unit and Codeception Functional test types to Create New PHP Test dialog. That should simplify the creation of new Codeception tests, especially, with the feature described above: generation of test methods.

From the platform side the update brings:

  • Tasks: Shelve changes on context switching (IDEA-70996)
  • Display the content of unversioned files in the commit dialog (IDEA-156875)
  • Rest Client: support multipart/form-data (WEB-28563)
  • Docker: Add “Build” action for Dockerfiles (IDEA-172716)
  • Databases: Allow comparison of cells in data views(DBE-4582)

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

  • “Make call dynamic” quick fix for static calls (WI-21620)
  • Find in Path dialog won’t close (Ubuntu 16.04) (IDEA-170103)

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

Download PhpStorm 2017.3 EAP 173.3188 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 | 3 Comments