PhpStorm 2020.1 stable version released: out-of-the-box composer.json support, improved type inference, etc.

PhpStorm officially released version 2020.1, mainly including out-of-the-box composer.json support, code coverage of PCOV and PHPDBG, PHPUnit toolbox, advanced syntax checker, and many other updates.

Composer.json support out of the box

Now, when editing the composer.json file, all dependency management operations can be used directly.

You can create a new file composer.json from the context menu or press Ctrl (⌘) + N. The template for this file can be found in Preferences / Settings | Editor | File and Code Templates.

PHP type inference improvements

The type inference engine is at the core of PhpStorm, and the new version has made some significant changes, including:

  • Highlight extra @var tags
  • Track null type
  • Code completion to initialize the array
  • Code completion in array_map / filter

Code coverage of PCOV and PHPDBG

You can use Xdebug to get a code coverage report. But since it is mainly a debugger, it is expensive. To speed up coverage reporting, you can use more portable tools, such as the krakjoe / pcov extension or PHP 5.6+ built-in PHPDBG.

Now, PhpStorm supports both. The user needs to create a "Run" configuration for the test, select the desired Coverage driver in the settings, and click to run the test with coverage report:

PHPUnit Toolbox

In the recently released PHPUnit 9, many features have been removed or outdated. To speed up migration and prevent errors, PhpStorm added many checks and quick fixes.

In addition, you can now create a new test for the class by calling Alt (⌥) + Enter on the class declaration and selecting "Create a new PHP test".

The new version also includes improvements in metadata, IDE, UI, etc. There are many updates, and details can be found in the announcement:

https://blog.jetbrains.com/phpstorm/2020/04/phpstorm-2020-1-release/

Guess you like

Origin www.oschina.net/news/114944/phpstorm-2020-1-release