PhpStorm 2019.2 EAP #3

The third build of the PhpStorm 2019.2 EAP (192.4787.17) is now available!

With this build you can try the following new features: PHPT support, new intentions in String Juggling Toolbox, Method Breakpoints via gutter, shell scripts support, automatic suggestions of related files while you commit to a VCS.
As usual, all the updates from Web, DB, and the IntelliJ Platform are included!

Download PhpStorm 2019.2 EAP from the EAP page or via the JetBrains Toolbox App. Or, if you have the previous PhpStorm 2019.2 EAP build (192.4488.6) installed, you should soon get a notification in your IDE about a patch update.

PHPT support

Looking to contribute to the PHP interpreter source and join the PHP Internals core team? That could be a tough task if you don’t know C well. The best way to start contributing to any open source project is to write documentation or add tests! Fortunately, for the latter, you only need to know PHP. Tests for PHP are written in special .phpt files, which are basically a set of PHP scripts and additional information divided into several sections.

Well, PhpStorm 2019.2 comes with support for .phpt files!

  • Highlighting for sections and scripts
  • PHP and INI languages auto-injection to corresponding sections
  • Completion of section names
  • Jump to files referenced in EXTERNAL sections

phpt_support

Please let us know what you think and report new issues for missing PHPT features or any bugs you find!

Learn more about writing tests for PHP source in this tutorial by Sammy Kaye Powers. You can also find useful information on PHP TestFest Tutorials, PHP Internals Book, and qa.php.net.

New Intentions in String Juggling Toolbox

PhpStorm can help you with routine string manipulations. Whenever you need to split a string, change quotes, convert interpolation to sprintf call, or maybe concatenation to interpolation – just press Alt+Enter on a string and choose the appropriate action from the list.

In PhpStorm 2019.2, we’re extending this list with a couple more neat additions.
Let’s say you have a long sprintf expression, but you need to replace some substring and make it a parameter. Simply select it, press Alt-Enter, and PhpStorm will choose the correct place for a parameter for you:

string_extract_sprintf_param

The same trick works when you need to extract a part of a string and concatenate:

string_extract_concat

Method Breakpoints via the gutter

As you debug, sometimes you want to find out whether the execution flow goes into a certain function, i.e. whether the function did or did not run. To do this, you had to find the first executable line in a function body and put a breakpoint on it.
Starting with 2019.2, PhpStorm will support method breakpoints, so all you’ll need to do is place a breakpoint on the function declaration line and instead of a round icon you’ll see a rhombus.

method_breakpoints

VCS

Predicting forgotten files

When you’re forming a commit, the upcoming PhpStorm 2019.2 will suggest that you include the files you typically modify, together with the files you’re currently committing.

suggest_related_files

Show history for directory works through Git log

In PhpStorm 2019.2, it will be possible to select several folders in Project View and see all changes in any of these folders. Select the folders you want to check the changes in, and then choose Git | Show History from the context menu.

git_show_history

Support for Shell Scripts

PhpStorm 2019.2 will provide rich editing support for shell scripts, including word and path completion, rename refactorings, code generation (Cmd+N), and a number of live templates (Cmd+J).

shell_script_path

The upcoming PhpStorm 2019.2 includes integration with several external tools to enhance the shell script support even further.
For detecting possible errors in your script, the IDE will prompt you to install the inspection tool named Shellcheck, which can detect a ton of issues and provide quick-fixes for them.

shell_script_schellcheck

PhpStorm 2019.2 will also integrate with the external formatter engine known as mvdan/sh. When you invoke the Reformat Code action for the first time, the IDE will suggest installing this tool, and once that’s done PhpStorm will properly format your shell script.
The upcoming release of PhpStorm will have integration with the Explainshell website. Starting with this EAP build, you can select a command in the editor and press Alt-Enter on it. The IDE will then take you to Explainshell where you’ll find a detailed explanation of the selected command.

shell_script_explain


For the full list of changes in this build, including both bug-fixes and improvements, see the release notes.

Please report any problems to our issue tracker or comment on this post. Your feedback is much appreciated!

Your JetBrains PhpStorm Team
The Drive to Develop

This entry was posted in Cool Feature, Early Access Program and tagged , , , , . Bookmark the permalink.