PhpStorm 2023.2 Beta
In this build, we’ve added new inspections for PHP assertions and revised the integration with third-party quality tools.
This Beta allows you to try new features from the upcoming PhpStorm 2023.2.
The Beta build is part of the EAP, which means that it’s free to use and you can install it side by side with a stable version of PhpStorm. If something doesn’t work correctly, you can quickly roll back back to the previous version without interfering with your workflow.
Inspections for PHP assertions
With this release, we’ve extended the code insight logic to cover PHP assertions.
PhpStorm now detects and highlights PHP’s built-in assert() constructs, PHPUnit’s assertion methods, and methods from the webmozart/assert and beberlei/assert libraries if the assertion is redundant because it is always true or false.
The underlying inspections are Condition always evaluates to ‘true/false’ and Unreachable statement under Preferences | Editor | Inspections | PHP | Control flow.
Improvements for quality tools
PhpStorm 2023.2 has revised its approach to running inspections with third-party quality tools. The new implementation enables the usage of a baseline and the exclusion of files from inspections and mappings.
Previously, PhpStorm would run the code quality tool on a temporary copy of the source files, which made it impossible to use a baseline with ignored inspections or options like excludePath or scanDirectories. Now, PhpStorm runs the code quality tool directly on the source files (for batch inspections), or passes the contents of source files as a STDIN input (for instant analysis of opened files).
So far, the switch to STDIN input has been implemented only for the PHP_CodeSniffer tool, but we aim to have other code quality tools like PHPStan, PHP CS Fixer, and Psalm support input from STDIN as well.
Please see the release notes for the complete list of changes in the Beta build.
The PhpStorm Blog : The Lightning-Smart IDE for PHP Programming | The JetBrains Blog