PhpStorm 2022.2 is a major update that brings support for Mockery and Rector, enhanced support for generics and enums, improvements to our debugger and HTTP client, and more.
Finally, we keep improving the support for generics. With this release, we’ve added support for minimum and maximum values of integers and improved support for collections, in addition to improving type inference from closures. You can read about these changes in depth in this blog post.
Whenever one of your test assertions fails, PhpStorm will highlight the exact line where it failed and will allow you to rerun the test from the failed line using a new context menu suggestion. Just press Alt+Enter on the failed line to rerun that specific test.
You can now create enums from the Create Class dialog. Make sure your project’s PHP version is set to 8.1 or later, otherwise the enum option won’t show.
We’ve made several quality-of-life improvements to our debugger window, so that relevant data is always close at hand.
When debugging an object, the pseudo-variable will always be shown on top in the Variables pane:
Additionally, we’ll show the contents of an array in the variables pane so that you don’t need to manually open it:
And finally, whenever an object implements the
we’ll show the textual representation of that object in the Variables pane as well.
PhpStorm 2022.2 adds support for clickable URLs in several file formats. Whenever a URL is found in a PHP, JSON, YAML, or properties file, PhpStorm will highlight it and allow you to click it to open it in a browser.
We’ve introduced an improved version of the Run Current File functionality that is available from the Run/Debug widget. The widget now features a secondary menu that offers applicable runners along with the Run with Parameters action, which lets you tune the run configuration parameters before running the file.
We’ve updated our HTTP client to support both WebSockets and GraphQL.
On top of that, we made improvements to the UX of our HTTP client. You can select a run environment using an icon on the gutter.
We also introduced a status bar in the Response view.
You can now change the editor’s font size across all tabs using keyboard shortcuts. We’ve also added a useful Reset button to revert your font size changes back to the original size.
We’ve been actively working on support for Angular 14 in PhpStorm. The most important addition we’ve made in this release is support for Angular standalone components. PhpStorm now properly recognizes components, directives, and pipes marked as standalone: true.
Our support for Vue 3 has lagged behind some of the latest Vue updates. We’ve
shipped several improvements to address this, though some, such as Vite support,
were already included in the minor updates for v2022.1. PhpStorm 2022.2 also comes
with a few fixes. For example, it understands type narrowing in
PhpStorm 2022.2 comes bundled with TypeScript 4.7, supporting new language features
moduleSuffixes and ESM in Node.js. It will automatically insert
the .js extension to the import statement if the module is set to node16 or
nodenext in your tsconfig.json file. Additionally, PhpStorm supports the
typesVersions field in package.json files.
With this release, we are moving from JetBrains Runtime 11 (JBR11) to JetBrains Runtime 17 (JBR17). This will have the following effects:
We’ve been working on making our Markdown support better. In this release, we’ve added a new Generate Table of Contents action that will make creating a table of contents for your Markdown files much more straightforward. You can use Alt+Insert, which brings up the Insert… popup. You can then select Table Of Contents, which will be generated automatically for you.
These are the most important changes in the release, but of course there are a lot more:
If you’d like a closer look at all the finer details and other cool enhancements we’ve implemented, check out the release announcement on the PhpStorm blog.