PHP Tools for Visual Studio v1.84.20547

Released: Mar 6, 2025

v1.84.20547 での更新項目

機能

  • Laravel Support
    • Code completion for the Eloquent "magic", and Laravel-specific functions.
    • Extensible code completion through the special ide.json file.
    • Type resolution for Laravel service containers (app(), App::make()).
    • Completion for config keys in config(..), config()->string(..), Config::get(..), and others.
    • Completion of environment variables.
    • Completion of view attributes in special Laravel functions.
    • Completion of named routes in specific functions.
    • Completion of route parameter names in specific functions.
    • Completion of IDs from language translation files in specific functions.
  • Eloquent Support
    • Completing model columns in various Eloquent Query Builder methods. Columns are resolved from (what's defined first):
      • Model class PHPDoc @property(s).
      • Models Factory class definition() function.
      • Using models table (if can be resolved), lookups migrations in database/migrations/ and Schema definitions.
    • Completing model dynamic fields.
    • Completing magic whereCOLUMN() functions.
    • Auto-completion for query builder methods, model columns, and factory attributes.
    • Improved return type inference for Model::query(), select(), and find(int).
    • Enhanced support for Eloquent local scopes, magic whereCOLUMN() methods, and @mixin.
  • Code Analysis and Type Inference
    • Added support for line comments in PHPDoc structured type names.
    • Enhanced support for @mixin, template-type<>, and iterable type hints.
    • Implemented support for callable type conversion.
    • Improved handling of static return types in traits.
    • Improved type inference for int and float, resolving issues with mixed types.
    • Improved array unpacking type inferring.
    • Improved foreach control variable type inferring for old Collection.
    • Improved array_find() return type inferring.
    • Improved @var handling inside conditional blocks.
    • Now respects @var annotation above if statement.
    • Now respects @param and @var annotations when inferring types.
  • Code Navigation and IntelliSense
    • Improved inlay hints for methods defined via @mixin, new static(), and closures.
    • Improved IntelliSense for PHP 8.4.
  • PHP Project and Composer
    • Improved handling of PHAR files in the project structure.
    • Avoided parsing non-PHP entries in PHAR archives to optimize performance.
  • Configuration and Code Formatting
    • Added support for blank lines around properties, fields, and enums.
    • Added support for property hooks in property promotion.
    • Added support for asymmetric visibility formatting.
    • Added support for PER defining blank lines and JavaScript backtick processor.
    • Improved blank line handling for anonymous classes.
  • Miscellaneous
    • Addressed performance optimizations, reducing unnecessary memory allocations.

不具合の修正

  • Code Analysis and Type Inference
    • Fixed implicit visibility checks, ensuring proper protected access handling.
    • Fixed PHPDoc annotation parsing.
  • Code Navigation and IntelliSense
    • Fixed support for attributes above anonymous classes (formatting and language features).
    • Fixed hover and go-to-definition issues for class NAME and ?FQN syntax.
    • Resolved tooltip rendering issues in traits and anonymous classes.
    • Corrected mouse hover issues.
  • PHP Project and Composer
    • Fixed incorrect composer package paths in indexing.
    • Resolved memory leak issues related to PHP framework instances.
  • Miscellaneous
    • Fixed indirect returns of static from traits.
    • Corrected array unpacking behavior.
    • Fixed various stability issues.