March 2025 (version 1.84)
We’re thrilled to announce the release of version 1.84, bringing powerful enhancements and seamless improvements to PHP in Visual Studio! This update improves full support for PHP 8.4, smarter type inference, refined formatting, and a significant boost to Laravel and Eloquent features. With optimized IntelliSense and crucial stability fixes, coding gets faster, smoother, and more intuitive. 🚀
Laravel & Eloquent Support
Laravel
- 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
- 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/
andSchema
definitions.
- model class PHPDoc
- 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()
, andfind(int)
. - Enhanced support for Eloquent local scopes,
magic whereCOLUMN()
methods, and@mixin<Builder>
.
Code Analysis & Type Inference
- Improved handling of
static
return types in traits. - Enhanced support for @mixin, template-type<>, and iterable type hints.
- Fixed PHPDoc annotation parsing and improved @var handling inside conditional blocks.
- Improved type inference for
int
andfloat
, resolving issues with mixed types. - Respected
@param
and@var
annotations when inferring types. - Better array unpacking type inferring.
- Better
foreach
control variable type inferring for oldCollection
. - Respects
@var
annotation aboveif
statement. - Better
array_find()
return type inferring. - Implemented support for callable type conversion.
- Fixed implicit visibility checks, ensuring proper protected access handling.
- Support for line comments in PHPDoc structured type names.
Code Navigation & IntelliSense
- Fixing support for attributes above anonymous classes (formatting and language features).
- Fixed hover and go-to-definition issues for
class NAME
and?FQN
syntax. - Improved inlay hints for methods defined via
@mixin
,new static()
, and closures. - Corrected mouse hover issues and improved IntelliSense for PHP 8.4.
- Resolved tooltip rendering issues in traits and anonymous classes.
PHP Project & Composer Improvements
- Fixed incorrect composer package paths in indexing.
- Improved handling of PHAR files in the project structure.
- Avoided parsing non-PHP entries in PHAR archives to optimize performance.
- Resolved memory leak issues related to PHP framework instances.
Configuration & Code Formatting
- Added support for:
- Blank lines around properties, fields, and enums.
- Property hooks in property promotion.
- Asymmetric visibility formatting.
- PER defining blank lines and JavaScript backtick processor.
- Improved blank line handling for anonymous classes.
Bug Fixes & Optimizations
- Stability fixes.
- Addressed performance optimizations, reducing unnecessary memory allocations.
- Fixed indirect returns of
static
from traits. - Corrected array unpacking behavior.