January 2024 (version 1.78)

Welcome to the January 2024 release of PHP Tools for Visual Studio!

IntelliPHP in Visual Studio 2019

It's been in Visual Studio 2022 for a while and now - we're adding our local AI suggestions to Visual Studio 2019 as well!

intelliPHP in VS 2019

Refactorings

  • Refactoring of private properties.
  • Refactoring of property names specified inside property_exists() function.
  • Fixes generating implementation for abstract methods and interfaces.
  • Added new quick refactorings.

refactoring

Completion for $GLOBALS and $_SERVER

A must have code completion for arrays has been added to PHP Tools. Array keys for variables, and super-global variables are listed in code completion:

completion

Custom Formatting & Code Styles

  • Global options (Tools/Options - Text Editor/PHP) allow for more detailed settings.
  • Added a few more custom format settings.

redundant closing tag

Improvements

  • Doc Block with multiline array<> syntax supported.
  • Doc Block with @psalm-type definition using = character supported.
  • Doc Block with @var defining a type of whole expression (not just a variable) is handled.
  • Type analysis improved in case there are a lot of array types with key names.
  • Type analysis handles complex L-value of instanceof operator.
  • Type analysis improved in case there are a lot of array types with key names.
  • Improves handling global variables in WordPress source code.
  • Code completion for array keys, type inferring for array entries, and array keys for $_SERVER and $GLOBALS.
  • Improved array_unshift() type analysis.
  • Improved detection and completion for eloquent local scopes.
  • WordPress's structured array/object doc comment syntax is recognized and respected by code analysis and code completion.
  • Workarounds diagnostics in incorrectly generated type names in _ide_helper.php.
  • Diagnostic for ${} deprecated string interpolation and corresponding code action.
  • Improves resolution of methods returning static/$this (#1820).
  • Various code analysis improvements.
  • Memory usage optimizations, and general performance improvements.

Fixes

  • Stability fixes for Stack Overflow Exception (happens in Symfony framework) #437/46
  • Updated PHP parser to handle keywords in PHP8+ FQN namespace syntax.
  • Fixes falsy diagnostics of unreachable code.
  • Not reporting unknown property if it was checked with property_exists().
  • Fixed inlay hints in ambiguous function calls (a function defined in two places or opened in two files).
  • Crash fixes.