PhpStorm 2022.1 EAP #7
PhpStorm 2022.1 EAP build #7 is now available. To catch up on all the new features coming to PhpStorm 2022.1, check out our previous EAP blog posts.
The Early Access Program is coming to a close, and we are now focusing on stabilizing and polishing PhpStorm for release. This is a good time to report any lingering issues that you’ve encountered, as there is still time to fix them before the release.
Inplace Extract Method refactoring
Extract Method has been available in PhpStorm since 2011 and is one of the most used refactorings. We’ve made quite a few improvements for it in PhpStorm 2021.3.
To use this refactoring, select any piece of code and press ⌘⌥M (Cmd+Alt+M / Ctrl+Alt+M).
Previously, this would open a dialog for refactoring configuration. No one likes pop-ups, though, so in PhpStorm 2022.1, in many cases for extracting a method an inplace refactoring will be available instead.
There will be no dialog, and a new method (or function) will be created right away in the editor. The cursor will be active to edit the name of the new method.
You can still open the dialog by pressing the gear icon and adjusting the refactoring settings.
Improvements for WordPress
Jump from hook invocation to registrations
The hook system of WordPress is powerful but relies on the string names of events (actions). Because of that, it was not possible to jump straight from a place where a hook is called to where the handler is declared.
In PhpStorm 2022.1, there will be a gutter icon on the left of the invocation. Click it to see the list of hook usages, including registration and other invocations.
Support for dynamic paths with get_template_directory_uri()
In PhpStorm, you can ⌘+Click (Ctrl+Click) on file paths to open the corresponding files in the editor.
That didn’t work for dynamic paths in WordPress code when the part was compounded using some WordPress functions.
In this release, we are adding support for get_template_directory_uri() function in paths.
Generics for PHP
We continue improving support for annotations-based generics in PhpStorm. In the upcoming release, we covered a few more cases.
Hidden tab labels in Debugger
To maximize the usable space in the Debug tool window, we’ve hidden the tab labels by default. To make them visible again or to customize their location, use the Show Tab Labels option in the Layout Settings.
Updated Markdown Editor Floating Toolbar
To make it easier to format Markdown files, we’ve reworked the floating toolbar that appears on text selection. Besides the new design, the toolbar now lets you create lists and provides a menu for selecting header styles.
The toolbar is customizable, so you can fill it up with the options you need most. To do so, go to Settings / Preferences | Appearance & Behavior | Menus and Toolbars | Markdown Editor Floating Toolbar.
The full list of changes in this build is available in the release notes.
Important! PhpStorm EAP builds are not fully tested and may be unstable.You can install an EAP build side by side with a stable PhpStorm version to try out the latest features.EAP builds are free to use but expire 30 days after the build date.
Please report any problems you find to our issue tracker or by commenting on this post.