PhpStorm 2022.1.x
Released: Apr 14, 2022
2022.1.x での更新項目
2022.1.4
Updated Jul 21, 2022
Fixes
- External diff tools settings being lost after IDE restart.
- High CPU usage during AsciiDoc editing.
- Permanently disabled Run Git Hooks checkbox.
- Fixed a crash on macOS High Sierra with version 2022.1.3.
2022.1.3
Updated Jun 22, 2022
Features
- Added support for inplace method extraction in traits.
- Added support for using duplicates for inplace method extraction.
- Added several improvements to code folding in Dart files.
Fixes
- Fixed the missing New Watch button in the Debug tool window.
- Fixed an issue that was making it impossible to connect to OpenSSH 8.8+ servers.
- Fixed the problem causing the wrong file encoding for specific files.
- Fixed an endlessly expanding popup window.
2022.1.2
Updated Jun 2, 2022
Features
- Improved TypeScript support - Added support for several new TypeScript 4.7 features:
- Conditional types.
- typeof on #private fields.
- Optional variance annotations for type parameters.
Fixes
- Double Shift on terminal focus - Fixed an issue where using double shift for Search Everywhere didn’t work when the terminal window was in focus.
- Keyboard navigation in the Create New Class dialog - When creating a new class, an issue was making it impossible to use the keyboard to navigate between the fields in the dialog. This bug has been fixed.
- Backspace with multiline editing - There was an issue with multiline editing where pressing Backspace only had an effect on the first line in multiline selections. This behavior now works properly again.
- Git diff from the commit panel - In some cases, clicking a commit in the commit panel didn’t show the proper Git diff, but instead just opened the file. This has been fixed.
- Destructor return types - The IDE was offering a suggestion to add a return type to destructors, which isn’t allowed in PHP. This suggestion has been removed.
- Pasting in blade files - Fixed some cases where you weren’t able to paste text in Blade files.
- Tailwind autocompletion - Autocompletion for Tailwind was not working properly in some cases, this has been fixed.
- Closing or minimizing PhpStorm when interacting with UML diagrams - On some occasions, you weren’t able to close or minimize PhpStorm when interacting with UML diagrams. This has been fixed.
- @phpstan-import-type and @phpstan-type fixes - Fixed an error where a type imported by @phpstan-import-type wasn’t being properly recognised when used in @phpstan-type.
- @psalm-type in return tag of closure - PhpStorm wasn’t able to recognize @psalm-type types as the return types of closures. This has been fixed.
2022.1.1
Updated May 13, 2022
Features
- Vite support - Added support for Vite.
- Multiline array formatting - Made some improvements to how multiline arrays are auto formatted by PhpStorm.
Fixes
- Improved blade formatting - The @case and @break directives within a @switch directive weren’t properly formatted by PhpStorm.
- Default property visibility - PhpStorm allows you to define the default property visibility in Settings / Preferences | Editor | Code Style | PHP | Properties Default Visibility. However, when automatically generating a property via the constructor, PhpStorm didn’t set the correct visibility.
- Rename dynamic fields - PhpStorm wasn’t able to correctly use rename refactoring combined with dynamic properties.
- Twig simultaneous delimeter’s editing - When changing a delimiter in a Twig file, PhpStorm will automatically change its corresponding opening and closing delimiter as well. However, this behavior didn’t work when the expression contained a string (which happens often). This now works properly.
- Wrong visibility when changing visibility during inheritance - PHP allows you to change the visibility of any method or property to a less strict one during inheritance. PhpStorm however didn’t detect these changes in some cases when working with abstract classes.
- Fix index error in Magento projects - PhpStorm 2022.1 had an issue with broken indices in some Magento projects, causing a Null Pointer Exception after indexing those projects.
- List type in multiline array shapes - PhpStorm 2022.1 added support for multiline array shapes. However, there were still some edge cases where the list<string> notation wasn’t recognised by PhpStorm as a valid type. The list type, by the way, represents continuous, integer-indexed arrays. In other words: values where the array_is_list function returns true.
- Fixes to psalm-import-type - PhpStorm supports type aliases in doc blocks that you can import and use in other places. However, the use of @psalm-import-type in some cases weren't properly detected.
- False-positive inspections - Some inspections marked code with a warning when they shouldn’t. Several similar issues have been fixed.
- Xdebug “Cannot get property” bugfix - The Xdebug integration had some issues not being about to show property information in several cases.
- Array shapes with single quoted keys - Array shapes weren’t properly detected when using single quoted strings as array keys.
- False-positive warnings about type mismatch for arrays with multiple element types - Docblocks that listed arrays with multiple types weren’t interpreted correctly, causing a bunch of warnings about type mismatches between docblocks and PHP types.
- FTP sync errors - PhpStorm 2022.1 had some issues when trying to use FTP to sync code between a server and your local development environment.
- Rsync errors on Windows - PhpStorm 2022.1 introduced some issues with Rsync on Windows where some files would end up using the wrong paths or where an error would occur when syncing.
2022.1
Updated Apr 14, 2022
Features
- Multiline and nested array shapes
- Adds full support for multiline and nested array shapes in both PHPDoc and in #[ArrayShape] attribute (Previously only single-line and single-level annotations were supported.).
- Add array shape annotations to get the code completion for the keys and infer the value types in simple array data structures or object-like arrays.
- You can use both PHPDoc and Attribute syntax in PhpStorm, whichever you prefer. The syntax is supported for return types and parameter types.
- Inplace Extract Method refactoring
- 'Extract Method' is one of the most used refactorings in PhpStorm. In order to simplify code and create a new method, just select the piece of code and press ⌘⌥M (Cmd+Alt+M / Ctrl+Alt+M).
- Previously, this would open a dialog for the refactoring configuration. Now, in many cases, for extracting a method you can use the inplace refactoring instead.
- There will be no dialog, and a new method (or function) will be created right away in the editor. The cursor will be active to edit the name of the new method.
- Enhanced support for Laravel Blade templates
- Previously, PhpStorm treated every code block in Blade templates as an independent scope which often caused issues with code completions and insights.
- This release significantly reworks how the IDE handles Blade templates. As a result, you’ll get better code completion in your .blade.php files.
- Improvements for WordPress
- Support for dynamic paths with 'get_template_directory_uri()' - In PhpStorm, you can ⌘+Click (Ctrl+Click) on file paths to open the corresponding files in the editor. That didn’t work for dynamic paths in WordPress code when the path was compounded with WordPress functions. In this release, support has been added for the get_template_directory_uri() function in paths.
- Jump from hook invocation to registrations - The WordPress hook system is powerful, but it was not possible to jump from where a hook was called to where the handler is declared. Now there is a gutter icon to the left of an invocation. Click it to see the list of hook usages, including registration and other invocations.
- New advanced PHP metadata capabilities
- Support to magic __call and __callStatic - If you rely on the magic methods _call or _callStatic, then you would lose code completion for the methods, as they are not defined. In this release, you can add the corresponding metadata entry and get autocompletion for such calls. You can even automatically handle dynamic calls, receiving a specific method name from a parameter value.
- Support union types - You can now specify union types as @|MyClass in .phpstorm.meta.php – this can improve the coding assistance for mocks.
- Improved annotations support and generics
- Improved support for annotation-based generics in PhpStorm. In this release, a few more cases have been covered, including, but not limited to:
- @psalm-import-type.
- @phpstan-import-type.
- @psalm-trace.
- @phpstan-trace.
- Generics in @method tags.
- New Composer Project wizard
- When creating a new empty project, the option has been added to automatically generate a composer.json file for it and provide the desired dependencies. After the project is created, PhpStorm will prompt you to install them.
- User Experience
- New Notifications tool window - The Event Log instanсe has been replaced with a new Notifications tool window. It helps you maintain a better overview of the IDE notifications and reduces the chance of missing anything important.
- Updated Structural Search and Replace dialog - The Structural Search and Replace dialog has been redesigned to feature a list of all the templates to make it easier to navigate through them. A Pin Dialog icon has also been added in the upper right corner of the Structural Search and Replace dialog.
- Evenly split tabs - You can now evenly distribute the working space among editor tabs to have the same width.
- Export UML diagram to other formats - Export UML diagrams as yEd .graphml, JGraph .drawio, Graphviz .dot, Mermaid .md, Plantuml, and IntelliJ IDEA .uml files, making them compatible with third-party tools.
- Improvements for Markdown
- Run commands from Markdown files - README files often describe the steps needed for running an app and list the commands you need to use. This release will let you run those commands right from the markdown file - just click on the Run icon in the gutter to the left of the command.
- Copy code snippet for Markdown - Added a new Copy code snippet action to Markdown blocks, which will let you quickly copy their contents to the clipboard.
- Updated Markdown Editor Floating Toolbar - The floating toolbar that appears on text selection has been reworked to make it easier to format Markdown files. In addition to the new design, the toolbar now lets you create lists and provides a menu for selecting header styles. The toolbar is customizable, so you can fill it with the options you need most.
- VCS (Version Control)
- Updated Annotate with Git Blame - Improved the functionality of Annotate with Git Blame to make investigating introduced changes easier. The IDE highlights the difference in the lines right in the editor when you hover on an annotation and opens the Git Log tool window when you click on it.
- Suggested changes in pull request comments - It’s now easier to work with suggested changes in PhpStorm as you can now apply or commit changes locally, right in the IDE.
- Updated Commit Details pane in Git tool window - The Commit Details pane now includes information about GPG signatures and build status. Previously, this data was shown only as a column in the Git log.
- Git File History: new UI without index - The new UI for the Git File History tool window is now independent of the indexing process. The data is represented with a new interface even if the Log index is off.
Fixes
- Issues with code completion and formatting in Blade templates have been resolved.