March 2023 (version 1.72)
Welcome to the March 2023 release of PHP Tools for Visual Studio!
Sometimes it is not clear what function arguments are used for. We are adding so-called inlay hints that annotate function parameters, inferred function return type, by-ref semantics to arguments, and expressions type.
Enable or disable Inlay Hints in
Short Open Tags Option
Now you can force the PHP Editor to treat short open tags
<? differently. Go to
Advanced. You'll find an option called Short Open Tags. You can enable or disable treating short open tags, or leave it to "Auto" which is the legacy behavior.
Previously the editor was parsing code next to
<? according to various settings and the current PHP version.
Several quick refactorings through code actions have been added.
Assignments can be simplified with
Transforming expressions to the new nullable object operator
if conditions can be simplified.
switch blocks can be simplified with the new
PHP Documentary Comments have been improved as well. In addition to more code diagnostics, the editor understands the wide range of Psalm and PHPStan type annotations.
Type names specified in Doc Comments can specify templates and generic types, callable specifications, structured arrays, literals, and more.
Additionally, the triple dot syntax
... is now allowed within the
@param tag, and the
@param-out tag is recognized.
- Checks for use of
- Assignment to non-existing properties is checked.
- Check for use of an unknown attribute class.
- Check that class used within the
throwexpression is throwable.
- Fixes many false-positive warnings!
Other Editor & IntelliSense Improvements
- Facades from traits are recognized.
- More precise type inference for some built-in functions.
- More precise analysis of
- Completion of properties after
- Updated integrated PHP manual.
- Go To Def prefers declaration in the same file. It avoids showing the unnecessary list of all functions.
- Comment/uncomment block (
/* ... */) instead of line comment (
- Lots of minor UI fixes and code analysis improvements.