Early Access Program

PhpStorm 2019.2 EAP #6

PhpStorm 2019.2 EAP build 192.5438.24 is now available!

In this blog post, read about structural search preview in the editor, a browser for the Docker container file system, highlighting for associated loop when the caret is over break/continue operators, and autocompletion for callable types. All of these goodies are available for you to try in this EAP build.

The latest updates from Web, DB, and the IntelliJ Platform are incorporated too, as usual.

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 installed, you should soon get a notification in your IDE about a patch update.

Structural Search Preview

Structural Search is a powerful feature that allows you to search for a specific code pattern in your project. It’s a lot more than just text search, as it is capable of operating with type information. Structural Search can be especially useful when you are searching through a large project, as a simple search may find too many occurrences. Go to menu Edit → Find → Search Structurally… to try it.

The problem with structural search is that it can be tricky to create a good search pattern. The upcoming PhpStorm 2019.2 will come with a welcome change – now the IDE will instantly highlight the found occurrences of your structural search in the editor. You don’t have to run a modified pattern again and again anymore as you experiment with your search pattern.

Now the IDE will display the values of the filters right in the editor area of the Structural Search dialog. (Previously, the filters were shown in the tooltips, so you had to hover over the variable to see it, and it was only possible to view one filter value at a time.)

ssr_preview

Let’s say you have a class with some method and a parameter of a certain type. You want to find all the calls of the method where a certain subtype was passed as an argument. With the usual text search, this would be difficult to pull off. With Structural Search, it’s a piece of cake! Just open define the search pattern with the following filters:
$instance$ type=\Type ->$method$ text=methodName ($param$ type=\Param\SubType).

Learn more about what Structural Search is capable of in the documentation.

Highlight loop when caret is above break/continue

PhpStorm conveniently highlights both brackets or both parentheses when your caret is over the closing or opening one. If you are working with loops that have nested loops or branches, it may be not obvious which loop the break or continue statements are referring to.

In the upcoming 2019.2 release, the IDE will highlight the respective operators for you:

continue_break_highlight

Autocompletion for callable type

Sometimes you may need to pass a function as an argument, for example, when you have a callable parameter. PHP allows specifying callables in different ways.
In 2019.2, PhpStorm will autocomplete callables in both string literals and arrays:

callback_autocompletion

Updates for Docker

You may have already noticed that Docker has moved to a new tool window called Services. The goal of this tool window is to provide a single place to view all connections and running processes. So far in PhpStorm, it includes Docker and Database connections.

You can view all the service types as nodes, or you can alter the view to see them as tabs. Use the “Show in New tab” action from the toolbar, or simply drag and drop the needed node onto the edge of the Services tool window.

services_tool_window

Browser for Docker container file system

In the upcoming PhpStorm 2019.2, it will be possible to view the file system of the running Docker container. The file system will be displayed in the newly added Files tab.

docker_browse_filesystem

For the full list of changes in this build, please see the release notes.

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

Check out previous EAP blog posts for more updates and added features:

Your JetBrains PhpStorm Team
The Drive to Develop

image description