Home  >  Article  >  Development Tools  >  A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

WBOY
WBOYforward
2022-02-21 09:40:253171browse

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.

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

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:

Multi-line and nested array shapes

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:

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

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:

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

In addition to multi-line and nested comments In addition to support, there are many other improvements to array shapes.

Supports array shapes with numeric keys

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

Supports specific arrays in class object arrays

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

Support array shape list

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

Support array shape annotation for @var variable usage

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

Improvements to Vue

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.

A quick look at what’s new in PhpStorm 2022.1: enhanced array shapes

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!

Statement:
This article is reproduced at:Laravel技术社区公众号. If there is any infringement, please contact admin@php.cn delete