PhpStorm 2021.2 EAP #6

This build introduces support for one-line array shapes definitions in PHPDoc. Read on to learn more.

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 to our tracker, as there is still time to fix them before the release.

Download PhpStorm 2021.2 EAP

Array Shapes PHPDoc Syntax Support

While PHP has a great object system, it сan be useful to work with simple data structures or object-like arrays when defining a real class feels excessive.

In such cases, the structure of the arrays is known beforehand, but without additional metadata PhpStorm is not able to grasp it and provide code completion.

Starting from PhpStorm 2020.3, it is possible to define the structure of such arrays with an #[ArrayShape] attribute. Learn more.

In the upcoming 2021.2 release we are adding support for the PHPDoc syntax!

This is limited to one-line definitions only. Multiline syntax support is work in progress, but might not happen. Nested array shapes are not supported either. Stay tuned for updates.

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

The PhpStorm Blog : The Lightning-Smart IDE for PHP Programming | JetBrains Blog
Read More

Latest News

PHP-Releases

PHP 8.0.23 released!

PHP 8.1.10 released!

PHP 7.4.30 released!