Early Access Program

PhpStorm 2020.1 EAP #6

We’ve just updated the PhpStorm 2020.1 EAP!

Try the reworked “Move method” refactoring, a unified UI for SSH configurations, and completion for PHP that is assisted by machine learning. Read on to learn more.

If you prefer to watch the updates on YouTube, our JetBrains channel has another installment in the series called What’s Coming in PhpStorm 2020.1Episode 4 is already online!

Download PhpStorm 2020.1 EAP

Move method refactoring reworked

Sometimes you may find that a class method does not really belong to the class and should be moved to another class, to follow the Single Responsibility Principle.

If this method is used many times around your codebase, PhpStorm can really help you do such a refactoring.

In previous versions of PhpStorm, to move a method you first had to make it static and only then invoke one more action and use a popup to move it to another class.

In the upcoming PhpStorm 2020.1, the “Move method” refactoring is streamlined into a single atomic action. We’ve also removed the unnecessary popups to make it quicker and cleaner. And if a moved method has no references then PhpStorm will not make it static.

Place the cursor over a method and press F6 (or Ctrl+T, 3). Then choose a destination class, and you are done.

move_refactoring

Discover more refactorings by pressing Ctrl+T anywhere in the code.

A unified UI for SSH configurations

Previously, if you had to configure Deployment via SFTP, add a remote PHP interpreter via SSH, or use an SSH terminal, you had to configure an SSH connection for each, even if you were using the same server for all of them.

PhpStorm 2020.1 introduces a unified UI for configuring SSH connections. You can find it under Preferences/Settings | Tools | SSH Configurations.

unified_ssh_config

All these configurations will be available to pick from whenever you need them. And, to make a connection shared between all your projects, deselect the checkbox Visible for this project only.

unified_ssh_remote_php

Commit tool window and Commit dialog

We appreciate all the feedback we’ve had about the new Commit tool window, which we introduced in an earlier build of this 2020.1 EAP. Taking into account all the different opinions about the commit functionality, both inside and outside JetBrains, we’ve changed its behavior. Here’s how.

The Commit dialog is enabled by default again for users with existing configs, as it was in 2019.3 and earlier. That means that all commit features look exactly like they did before. This way, we don’t break the fashion in which thousands of PhpStorm users are accustomed to committing things.

We do believe though that switching to the new Commit tool window has a lot of benefits. For instance, it displays the list of changed files much better and provides the full-sized diff in the editor. Additionally, it does not block the IDE or lose file/chunk selections.

If you do prefer the Commit tool window, you can re-enable it by going to Preferences / Settings | Version Control | Commit Dialog and then selecting Commit from local changes without showing the Commit dialog (see the screenshot below).

commit_dialog

All new users will still get the Commit tool window as the default way of committing changes. This means that if you start PhpStorm on a clean machine without using any configs from previous builds, you will see the Commit tool window by default.

ML-Assisted Completion for PHP

As a matter of fact, we introduced machine-learning (ML) completion for PHP back in v2019.3. It improves code completion by reordering the elements in the completion popup so that the most relevant items are ranked higher. We will continue to keep adding improvements in this area for the upcoming 2020.1 release.

How to see ML in action:

By default, ML-assisted completion is disabled. We don’t want them to take our jobs. To turn it on, select the checkboxes Rank completion suggestions based on Machine Learning and PHP under Preferences/Settings | Editor | General | Code Completion.

ml_settings

If you also select Show position changes in completion popup, you’ll see up and down arrows in the completion popup indicating exactly how ML changes each specific ranking.

ml_completion

In the image above, you can see the position changes for members exposed by the Request class with the enabled ML-assisted completion. For example, the get() method moved up 3 positions compared to the default completion mechanism, while files property dropped 2 positions.


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!

Your JetBrains PhpStorm team
The Drive to Develop

image description