Home > Article > Development Tools > A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes
This article brings you relevant knowledge about phpstorm Zeng Qing’s array shapes, including multi-line and nested array shapes, support for array shapes with numeric keys, and support for class object arrays Regarding specific arrays and other related questions, I hope it will be helpful to everyone.
phpstorm The third version of the 2022.1 Early Access program is now available, this version focuses on enhanced support for array shapes and annotations, here comes Introducing:
PhpStorm 2021.2 introduces support for array shapes in PHPDoc blocks. However, it has a big limitation - only single-line and single-level comments are supported. If you want multi-row support, you have the option of using the #[ArrayShape] attribute, but it still doesn't support nested structures.
PhpStorm 2022.1 EAP 3 Added full support for multi-line and nested array shapes in PHPDoc and properties:
In this case, you can define an array structure using an array shape annotation to get code completion for the keys and infer the type of the values.
Booth PHPDoc and Attribute syntax can also be used in PhpStorm, which supports return type and parameter type definition:
In addition to multi-line and nested comments In addition to support, there are many other improvements to array shapes.
The 2022.1 version of JetBrains' IDE has made many improvements to Vue 3. PhpStorm integrates all of WebStorm's improvements to HTML/CSS/JS and other web technologies. In this release, if you define components as global, the IDE will recognize them in your .vue files.
PhpStorm also correctly supports the createApp syntax, which will correctly match applications created using createApp related elements.
This release also includes support for Nuxt 3.
Recommended learning: "phpstorm tutorial"
The above is the detailed content of A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes. For more information, please follow other related articles on the PHP Chinese website!