Changelog
(pre-release)
1.62.18013
New Features
- Support for PHPUnit groups, so tests can be filtered in Testing panel by the group name.
- Support for CodeIgniter3 with type inferring, Controller properties, and model name completions.
- Improved type inferring in false branch when type checking.
- Improved type inferring making use of
class-stringtype. - Mouse tooltip for named parameter inlay hint.
Fixes
Stable
1.62.17969
Tests Code Coverage
We're introducing support for tests Code Coverage. Try it now, navigate to Testing panel, and click Run Tests with Coverage button. Code coverage will appear in Testing panel, Explorer panel, and also right in your code.



The feature relies on PHPUnit/Para/Pest functionality - it runs the tests using appropriate command line arguments and displays the coverage information conveniently right in VSCode. Please make sure, your
phpunit.xmlconfiguration contains<source>element. For troubleshooting, watch the OUTPUT window / PHP (Test Explorer) .
More Features
@seein mouse tooltip contains clickable links to the referenced symbols, if possible.@seein source code has semantically colorized symbols.- PHP 8.5 language level, pipe operator (
|>) and basic checks. - Validation of
enumdeclarations (#926). - Check for implicitly nullable parameters (deprecated in PHP >= 8.4).
- When running all tests with several test suites, only one process is created now.
Stable
1.61.17926
Improvements
- Behavior of
"search.exclude"is unified across Find all references, Code Lenses, Find Implementations, Symbols in Workspace. - Diagnostic for
newmember call without parentheses on PHP <8.4. - Pest functions respect the new
$this. Related to any parameters annotated with@param closure($this)or@param-closure-this(#918). - Diagnostic for unreachable match arm (#919).
- Changes how completion of function parameter snippets work, which complies with language server protocol and avoids unnecessary warnings by VSCode (#909).
PHPUnit, Pest, and Data Sets
We are introducing new features to the Test Explorer: Support for newer paratest, experimental support for Pest, and support for data sets right in the Test Explorer UI.

Fixes
- Fixed overload checks and quick fix to implement missing abstract methods (#2392).
- Fixed unwanted space after
[on the new line in array initializers (#923). - Spaces are added for lambdas when
php.format.rules.spaceWithinDeclParensis enabled (#922). - Fixed Go To Definition to a class symbol in PHP manual.
Stable
1.60.17873
Fixes
- Parameters completion snippet (setting
php.completion.parameters=="parameters") has default parameter values as it should have. - Fixes autocomplete in the inline CSS and script tags #914
Stable
1.60.17845
Improvements
- Checking invalid PHP configuration or configuration that may break debugging; all the warnings are listed in
OUTPUT/PHPlog. - Type inferring inside
traithas been improved, so members afterstatic::,self::,parent::are mostly resolved. The editor tracks all uses of giventrait, and it also looks at@extendsand@mixinannotations.
Debug
Fixed an issue where some breakpoints were incorrectly marked as unverified.
Fixes
$thisin lambda functions with@closure-thisor@param callable(TYPE $this)is annotated with correct type in tooltips.- "Override abstracts" code action generates correct type namespaces.
- Correctly resolves
@method static statictag. - Removed unnecessary parentheses around complex type names in tool tips.
- Correctly resolves
selfandstaticinsidetrait.
Stable
1.60.17803
Simplify && Code Action
Long conditions with call chains -> and and operator && can be simplified now to a single call chain with ?->.
Improvements
Various type inferring improvements has been made based on user's feedback.
Newly, methods called through magic __call() are annotated with PHP6615 diagnostic. This shows up in a tool-tip and the in the editor. The new diagnostic helps with unintended wrong method calls.

Fixes
- Fixed navigation for symbols in current file.
- Fixed navigation to symbols in PHAR files.
- Fixed
"php.problems.exclude"setting with simple"/"glob pattern. - Fixed
arraytype information causing wrong types in functions in/vendor/. - Fixed wrongly detected unused imports of classes used in property hookes.
- Fixed analysis of
method_exists()with ambiguous$class_or_objectargument. - Improved methods check in case of ambiguously inferred type.
Stable
1.59.17706
Minor Features
- Move magic methods to the end of the autocomplete list #690.
- Improves type information of Eloquent model attributes inferred from the model "casts".
- Code action to fix incorrect magic method modifiers.
- Improves
statictype resolution in complex generics.
Fixes
- Fixes false deprecation warnings of standard constants #2328.
Stable
1.59.17685
Fixes
- Fixes regression with false warnings about undefined properties when there is
__get()magic method.
Stable
1.59.17674
Laravel IDE Improvements
- Livewire computed properties in code completion and navigation.
- IntelliSense shows completions from various Laravel packages (e.g. Filament) (views, translation keys, routes, config keys).
- Laravel relationship methods can have return type
HasOne<T,G>using generics, and the relationship property will haveTtype. - Completes
$thiswith correct type in Blade files, when corresponding component class is found. - Completes Eloquent attributes found in
casts()method or$castsproperty. - Fixes
@errordirective in blade files.
Formatting
- Added setting for space before unary not #874.
- Fixes an issue where a closing brace was placed on a new line in single-line property hooks #878.
Diagnostics Improvements
Code diagnostics were improved in general to avoid falsy warnings. This fixes reporting of unknown class names that were checked before, falsy unimplemented abstract methods, invalid type inferring in some numeric operations, etc.
Additionally the editor now checks for unimplemented abstract properties (#870).
Fixes for #2322, #2272, #2286 (and related).
Minor Improvements
Stable
1.59.17515
Sort 'use' Statements
Newly, order of 'use' statements can be set either to alphabetic or by_length. This can be set in settings.json or in .editorconfig where the corresponding ij_php_import_sorting directive is respected.
To sort uses, follow the documentation page. You can sort uses with a code action, automatically on file save, or as auto-fix.
Laravel IDE Improvements
.php.language files are processed - methods liketrans(),__(), or blade's@langwill have completion and navigation with possible translation keys.- More model attributes in IntelliSense are typed.
Fixes
Stable
1.59.17478
Extract Method, Extract Constant
New code actions to extract selection of code as a function or extract selection as a constant.
Composer IntelliSense Enhancements
Since composer.phar is usually outside the workspace folder, hence it's definitions are unknown to the editor, we have included composer IntelliSense database (stubs).
Without doing anything, the editor will recognize Composer's classes that are used e.g. in /vendor/composer/ files, so they won't be reported as unknown and they can be inspected as well.
If user is developing for example a Composer plugin, they have two options:
- Adding
composer.pharinto the workspace to get IntelliSense (this consumes unnecessary memory though), - Or preferably adding
composerstubs into the workspace through the setting"php.stubs": ["composer", "*"]or using the command> Workspace Stubs.
IntelliSense Enhancements
- Navigation to constructors through
new self,new static, ornew parent(#857). - Navigation prefers symbols in the current file, if there are ambiguites.
- Handling reserved PHPDoc types ending with
-string. - Improved handling of undocumented features of
.phpstorm.meta.phpannotations. - Inspection of complex trait methods use.
- Use of
$thisin global code and Blade templates is not reported if properly annotated. - References to callable-string used as a parameter to a
callableparameter (#2295). - Reviewed and fixed URL of all built-in PHP definitions.
Laravel & Eloquent
- Dynamic properties from relationship methods are added to IntelliSense seamlessly. Their type is infered from the optional generic type anotation.
/** @return HasOne<T> Use generic type annotation to specify type of dynamic property `$relationship`. */ function relationship(): HasOne { ... } - Improved implicit types of Laravel/Eloquent magic methods like
Model::find(int), orContainer::make().
Formatting
- Prevented automatic collapsing of
foreachstatements into a single line for better readability. - Fixed an issue where enabling
javascript.format.semicolonsin the JavaScript formatter blocked the PHP formatter from applying changes #850 - Fixed formatting of block comments when they contain combination of tabs and spaces.
- Fixed formatting of intersetgion types #2309.
New Settings
php.files.exclude: glob patterns to exclude files and folders from being indexed by PHP language server, but not excluded from VSCode's Explorer View.php.navigation.referencesScope: choose whether go to references is strict (requires strictly typed object types), or resolves to any target location possible.phpTools.parallelismLimit: allows to limit number of background threads used for reading files form disk, parsing, and indexing (user machine setting).
Breaking Change
HTML auto-update tags was always enabled. Now it respects the VSCode setting "editor.linkedEditing" as described on code.visualstudio.com.
Fixes
- Performance improvements.
- Fix trait member with changed visibility (#854).
- Blade parser fixes.
Stable
1.58.17223
Method Overrides
Code action to implement selected method overrides has been added. Click on the class header, open quick fix menu (light bulb), and choose Override Methods. In the opened quick pick panel, tick some or all the overridable methods, and confirm.

Minor Features
- Updated integrated PHP manual and IntelliSense with (undocumented) PHP 8.4 definitions (#841, #823).
- Respects and suggests
@(psalm|phpstan)-require-(extends|implements); for class hierarchy validation, for membres code completion and for code navigation (#837). - Respects
@param-closure-this(#825). - Improves diagnostics for passing
&ref from lambda or any indirect function call (#831). - Outline shows visibility of properties and class constants.
- Formatting fixes for mixed JS/PHP code. #2259
- More specialied return type of
Request::user()orAuth::user(), giving better code completions after->.
Fixes
- Fixing blade formatter indenting too far.
- Fixes crash on domain-joined Unix systems.
- Fixes unwanted newline after a class body when preceded by a comment
- Fixes inline comments after PHP properties being moved to separate lines during formatting #2245
Stable
1.57.17158
New Features
"search.exclude" setting is respected for find references and workspace symbols features (thread #780).
Minor Improvements
- Updated integrated PHP manual and IntelliSense.
instanceoftype inferrence improved (#810).- Respecting anonymous function
newScopeif inClosure::bind()- fixes false warnings and improves code completion.
Fixes
- Fixed check of anonymous functions passed as a named argument (#821).
"files.exclude"patterns are treated the same way as in VSCode. There were some differences in the behaviour which should be gone now.- Both
"files.exclude"and"search.exclude"patterns are case-sensitive.
Stable
1.57.17031
New Features
Newly, code actions and quick fixes of a text selection are grouped. As a result, the same actions can be applied at once for all occurrences within the selection.

Select a portion of code and apply quick refactoring for all the occurrences. This is another enhancement simplifying the code cleanups, in addition to the Auto-Fix feature.
Improvements
- Analysis of
explode()on PHP >= 8 properly infers typestring[], excludingbool(#2129). - Reports that type analysis may be incomplete, resulting in possibly incomplete completion. This is caused by internal technical limitation and will be aimed in future.
- More Laravel magic when there is generated
_ide_helper.phpwith ambiguous/redundant definitions. - Reports unused
globalvariable within a function.
Fixes
- Resolving old-style constructors fix.
- Code complation and diagnostics within FQN containing reserved PHP keywords.
- Suggesting Eloquent column names from Model's PHPDoc property fixed.
- Possible fix/improvement when there is unnecessary
@mixincausing cycle in class definition. - Removed unwanted spaces after identifier named "and" or "or" #816
- Fixes Ctrl/Cmd+Click in the links in blade files #815
- Fix code actions in unsaved (untitled) documents.
Stable
1.57.16971
Minor Features
- Updated PHP manual/IntelliSense for newly documented PHP 8.4 declarations.
- Laravel service ID completion in
app(),App::make(), etc. - Eloquent's
find(int)gets more specific IntelliSense. - Navigation into
.pharfile entries. - Improved diagnostics and completions for some edge cases.
- Respects
@paramfrom base declaration (#804). - Profiling now works when running on Docker/Remote with
pathMappingsin your launch profile. The profiling data will be temporarily stored in/.vscode/profilingworkspace folder (#800). - Colors in HEREDOC/NOWDOC strings (#754). Note, that some themes do not support it.
- Clickable links are now provided in the HTML parts of PHP files.
Fixes
- Fixed blade braces autocompletion.
- Fixed Blade formatting issues that occurred in specific scenarios
Stable
1.56.16884
Minor Features
- Support for line comments in PHPDoc structured type names.
- Support for
template-type<,,>PHPStan PHPDoc type function. - Better array unpacking type inferring.
- Better
foreachcontrol variable type inferring for oldCollection. - Respects
@varannotation aboveifstatement. - Better
array_find()return type inferring.
Formatting
- Fixed an issue where
php.format.rules.blankLinesBeforeClassdid not apply correctly to anonymous classes. - Added support for property hooks in constructor arguments. #786
- Fixed a formatting issue with promoted asymmetric properties in constructor arguments. #788
- Fixed an unwanted blank line appearing before a lambda function when
.editorconfigoptionij_php_blank_lines_around_methodwas set. #818
Stable
1.56.16853
Laravel
- Code completion for the Eloquent "magic", and Laravel-specific functions.
- Extensible code completion through the special
ide.jsonfile. - 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/andSchemadefinitions.
- model class PHPDoc
- Completing model dynamic fields.
- Completing magic
whereCOLUMN()functions.
Laravel Blade
- Completing component aliases defined using
Blade::component(). - Completing view aliases defined using
Blade::include(). - Completing components from
ide.json. - Completing directives and if-directives from
ide.json,Blade::directive()and fromBlade::if(). - Livewire: Completing/navigating component attributes in
wire:modelvalue. - Livewire: Completing/navigating component action in
wire:***value. - Completing section names.
- Added
x-dynamic-componentto the completion. - Blade formatting and blade folding respects custom
if-directives. - Automatic insertion of spaces inside
{{}}or{{{}}} - Automatic insertion of
{!! !!}when you type{! - Automatic insertion of
{{-- --}}when you type{{- - Command
phptools.blade.switchViewClassto switch between view and class file. Go to "Open Keyboard Shortcuts" -> Search for "phptools.blade.switchViewClass" -> assign a shortcut.
HTML
- The completion list now appears immediately after an automatically inserted quote for an HTML attribute.
Formatting
- Added
php.format.rules.blankLinesBeforeReturnStatementto define the number of blank lines before a return statement. - Added
php.format.rules.blankLinesAroundPropertyto define the number of blank lines around a property. - Added
php.format.rules.blankLinesAroundClassConstantto define the number of blank lines around a class constant. - Added
php.format.rules.blankLinesAroundEnumCaseto define the number of blank lines around an enum case. - Extended PER coding style (
php.format.codestyleset toper), enforcing blank line limits according to the PHP PER coding style. - Resolved an issue with unwanted indentation in PHP files when using multiline template strings in javascript. #2215
Debug
- Enhanced support for
.envfiles in the debugger. - Deprecated the
envfileoption; useenvFileinlaunch.jsoninstead for environment variable configurations.
Fixes
- Fixed tripple-dots and inlay hints floating around when editing the code (#776).
- Sort and remove uses, and
editor.codeActionsOnSaveto sort and remove uses fixed for.blade.phpfiles with embedded PHP code (#483#issuecomment-2621398221). - Workspace Symbols don't list files from
vendorand folders specified in"files.exclude"setting. .pharfiles in composer packages are not ignored, and definitions from.pharfiles are properly included in IntelliSense.
Stable
1.55.16740
Fixes
- Corrected indentation for multiline method parameter attributes #767
- Inlay return type hint
Generatorshown properly for functions yielding values (generators). - Fixed bug when extension was trying to re-activate trial licenses every time the extension starts.
- Fixed use of Profiler when router script is specified.
- Fixed use of Profiler when more requests are made - all profiler outputs are opened. See Profiler Documentation for details.
Minor Features
- Code flow analysis infer full
Generator<TKey,TValue,TSend,TReturn>type of generators, which improves type inferring insideforeachover the generator, type check ofGenerator::send(), andGenerator::getReturn(). - Colorize Laravel route parameters in
Route::-like functions. - Profiling launch configuration added (when there is no
launch.jsonand user presses Start Debugging (F5)).
Stable
1.55.16685
More Laravel Support
- Completion and navigation for Laravel views and namespaced views.
- Completion and navigation for Laravel route names in
route()function. - Completion and navigation for components (
<x-...) in Blade files. - Completion and navigation of Livewire components after
<livewire:. - Completion and navigation for Livewire views in
@livewire()andLivewire::mount(). - Completion and navigation for component attributes from view class properties, Livewire
mount()and@props()directive. - Completion of views in
@includeWhen,@includeUnless, and@eachBlade directives. - Completion for paths in specific Laravel functions (
asset,storage, ...). - PHP features (IntelliSense, Inlay Hints, Code Lenses, navigation, ...) enabled in
Bladelanguage.
Formatting
As requested on #2195 we're introducting couple of new format settings:
php.format.rules.blankLinesBetweenUseTypes: Specifies the number of blank lines between different types ofusestatements (e.g., classes, functions, constants). This does not affect blank lines between statements of the same type.php.format.rules.blankLinesAfterOpenTag: Specifies the number of blank lines to insert after an open tag, except when the closing tag is on the same line.
See Customize Formatting for more details.
Fix: Default Launch Configuration for Laravel Projects
- The default launch configuration has been fixed to correctly use the Laravel router script.
- If you don't have a
.vscode/launch.jsonfile, simply open a.phpfile and pressF5. The default launch action will start and debug the development web server (assuming you have Xdebug installed). - Additionally, the initial
launch.jsonconfiguration now contains the correct launch settings for Laravel projects.
This fix affects using quick built-in development server whenever there is a web root in a subfolder, i.e. having
index.phpin/public,/wwwroot, or/webroot. Now, the built-in development server is started with a working directory same as the web root directory, e.g.${workspaceFolder}/public. You can try this if you don't have.vscode/launch.jsonfile, and you pressF5to start debugging.
Minor Features
- Structured object typed are displayed in tool tips and inlay type hints.
- Improves type inferring, makes better use of
class-string<T>annotations.
Fixes
- Running tests from abstract classes #753.
- Float and int literals in doc comment #752.
- Invalid unnecessary parentheses hint #750.
- Mouse hover and completion for expressions in parentheses #743.
- Completion after conditional expression.
- Default aliases resolved automatically in
laravel\framework>=11.30. - Return type of a method resolved from base classes.
- Resolved an issue where the first line inside an
@phpdirective in Blade files was indented further to the right each time the file was formatted, under certain formatting rule configurations (#548). - Fixed an issue where an unwanted space appeared after control flow directives in Blade files during formatting.
Stable
1.54.16574
Code Actions
- Added code actions for class member modifiers order (according to PSR-12) and for missing visibility modifier.
Improvements
- Structured arrays are simplified in tooltips and hints (#703).
- Better completion and mouse hover after
->operator, after assignment expression, afternewwithout parentheses.
Fixes
- Completion/Hover/Go To Definition after the new
...(set)keywords. - References count for class members referenced through
static::. - New
...(set)modifiers in constructor properties. - Renaming a global variable shows preview when renaming in another file.
- Doesn't check PSR autoload class name case-sensitively (there are issues with VSCode API and FileSystem API #635).
- Fixes unwanted space after function name in lambda functions #2196
- Navigation in properties with assymetric visibility #741.
Breaking Changes
- The extension does not bundle the old PHPUnit 6 binary anymore. When running PHPUnit tests, user needs to either install "phpunit/phpunit" composer package or specify
"phpunit.phpunit"setting value.
Stable
1.54.16480
PHP 8.4 Syntax
The editor respects the new PHP 8.4 asymmetric visibility syntax (#728). In case your PHP version does not support it yet, the syntax is underlined as error.
Profiling Tests & Launch Profiles
Test Explorer allows to Run, Debug, and newly Profile PHPUnit tests (if PHP Profiler extension is installed). See Profiling Tests for details.
Additionally, custom launch.json "php" profiles can be used to run tests.
Code Actions Have ID
More code actions have been documented (see Code Actions List), so they can be hidden or marked as autofix. Autofix is a neat feature allowing you to implicitly apply useful code actions (when available) on file save or as using "Autofix" command.
Improvements
- Better suggestion of variable names in syntactically broken file.
- More specific warning message for assigning non-variable by reference.
- PHP manual Italian language added. Use command
> PHP Manual Languageor setting"phpTools.language": "it". Note, texts not translated are displayed in English. - Running PHPUnit tests is faster (#725). Whenever possible, specific file path is passed to PHPUnit so it won't scan everything.
"php.executablePath"setting can be changed in workspace scope settings."php.executablePath"and"php.executables"can contain variables, i.e."${workspaceFolder}/bin/php".- ORM: Infers repository class when calling
EntityManager::getRepository(class-string<T>)using corresponding#[ORM\Entity(repositoryClass)]attribute on classT((#2174)[https://community.devsense.com/d/2174]). - Added code fixes required for WordPress and PER code style.
Fixes
- Resolved an issue where the
php.format.rules.maxBlankLinessetting was not correctly applied at the end of files. #2188 - Updated the Laravel code style to place the opening brace of anonymous types on a new line, ensuring alignment with Laravel conventions. #734
- Laravel code style removes a space before return type in function declaration #734
- Fixes use of template type arguments in a derived class declared in a
/vendor/folder (e.g. ORM'sEntityManager::getReference()).
Stable
1.53.16379
Code Actions Settings
Code Actions Severity can be changed now. It means certain refactorings or suggested quick fixes can be either hidden or marked as a warnings or error.
To hide a code action, use either:
- the corresponding quick fix "Do not show"
- or add the code action to
"php.problems.exclude"VSCode setting. - or add the code action to your
.editorconfigfile.
To change its severity, add the code action to your .editorconfig file. The following sample marks all the redundant closing tags ?> as errors, forcing you to clean it up:
For details, see:
[*.php]
php_remove_redundant_closing_tag = error
Code Action Autofix: a code action can run as auto-fix now. See Auto-fix for details.
Diagnostics
- New diagnostic checking invalid use of
instanceofwith a trait on right side.
Fixes
Stable
1.53.16338
Formatting
We’re excited to announce the introduction of a new PER code style option in our extension, aligned with the PHP-FIG PER coding style standard. This coding style is designed to help PHP developers maintain consistent, high-quality code that follows the latest industry standards. By using PER, you ensure your project’s code adheres to a standardized format, enhancing readability, maintainability, and collaboration with other developers.

To apply this style, simply set "php.format.codestyle" setting to "per" in your configuration settings, and the formatting adjustments will be automatically applied to your project. This new option is a great way to streamline code formatting and ensure alignment with the PER guidelines across your PHP codebase. Happy coding!
Code Actions
The Sort Uses Code Action is a powerful tool that can be applied in several contexts: as a code action, during auto-import, and in conjunction with the editor.codeActionsOnSave setting. This feature allows developers to automatically organize their use statements in a consistent order, making the code cleaner and more readable.
To further customize the behavior of this feature, you can control its case sensitivity. The setting "php.sortUses.caseSensitive" lets you specify whether sorting should take case sensitivity into account. Set this option to true for case-sensitive sorting, or false for case-insensitive sorting. By default, sorting is not case sensitive, so all use statements will be ordered without distinguishing between uppercase and lowercase letters.
For more details, check out the related discussion #2127 on our community forum.
Diagnostics
- Added diagnostic for using invalid class name, i.e. a reserved class name.
Fixes
- Copilot chat window does not break IntelliSense and code diagnostics; after closing changes suggested by Copilot chat are ignored.
- Fixed finding references between methods in class and traits used by this class.
- Fixed indexing composer packages symlinked outside the project folder.
- Fixed language server crash when class is named 'parent' or any other reserved keyword.
Stable
1.52.16273
Format Settings in .editorconfig
Newly, the code formatting rules can be fully adjusted using the standard .editorconfig file. See "customize formatting" for details.
Improvements
- Tool-tip text keeps the PHPDoc summaries formatted as they are (#2145)[https://community.devsense.com/d/2145].
- Type inferring improvements.
- Added quick action to ignore specific diagnostic globally.
Fixes
- Fixes
functionimport code actions. - Fixes format on type.
- Diagnostic:
FFI\CDatacan be used as array.
Stable
1.52.16226
Features
- New
PHP > Format Multiple Filescommand that lets you batch format multiple.phpfiles. First enter the glob pattern. All the format changes will be first collected and shown in a preview window. Files will be modified upon confirmation. - New code action to change fully qualified function name to an alias (#693).
- New setting
php.format.exclude. This allows to specify one or more glob patterns for files that won't get formatted using PHP formatter. This includesformatOnType, format document,formatOnSave, and format selection. Also when using the newFormat Multiple Filescommand, excluded files will be implicitly unchecked during the final format review.
Improvements
- Default language level changed to 8.3.
- Inlay hints with named parameters can be inserted on double-click only when labguage level is set to PHP 8.0 or greater (#686).
.vscode-serverexcluded from indexing by default (#2132).- Respecting
@property-writetogether with@property-read. - Structured array syntax in tool-tips (array types are not oversimplified in tool-tips).
callable()with...is properly parsed and variadic arguments are shown in tool-tips and respected by inlay hints.@template-contravariantPHPDoc keyword (#695).- Parentheses are not inserted when completing function name after the
use functionconstruct or as a trait alias. - Parses
covariantandcontravariantmodifiers in PHPDoc generic type specfication (#699). @paramfrom inherited class respected #702.- Anonymous function's
$thisinfered from containingClosure::bind()call #701.
Fixes
- Fix of unused use falsely reported when used in
@phpstan-import-from. /** @var */annotation above assignment does not mismatch types further below.privatetyped properties are not shown in code completion when in non-private context.InstalledVersion.phpfrom composer is indexed by IntelliSense.- Fixed typo in diagnostic message.
- Falsy warning about private properties while having magic
__getmethod. - Code completion after
identifier( new )->(#678). - Fixes completion after
defaultfunction name (#692). - Fixes falsy check for
ArrayAccessmethod overrides in PHP < 8.1 (#689). - Fixes completion after function return type hint and keywords (#670).
Stable
1.51.16099
Improvements
- Checking special array function for by-ref arguments.
- Recognizes
"php-64bit"version requirement incomposer.json. #665 - PHPDoc
Closure()with...alone. #661
Debug
- Added support for
skipEntryPathssetting, which allows specifying glob patterns to skip if the initial entry file is matched.
Fixes
- Fixes navigation to static object members through
::operator (tooltips, goto definition, code completion). #666 #2126 - Fixes indexing of
vendorwhen excluded from workspace #2100. - Fixes unwanted transformation of
FILTER_NULL_ON_FAILUREconstant to lowercase #2085. sodiumincluded in stubs by default.objecttype hint respecting structuredobjectphpdoc type hint.- Code completion works after multiple
::expression chain. - Fixes binding of template type arguments in inferred types #2106.
- Fixes caching of composer packages when composer is still running.
- Fixes formatting issue with
php.format.rules.alignConstantsnot correctly aligning constants outside of class context when a namespace is declared. #2114 - Faster initial indexing when there's many composer packages in
vendorfolder. - "auto-import" adds
useto the correct namespace scope. - Fixes possible language server crash when having too many
@importdirectives withfromaliasing.
Stable
1.51.15986
Improvements
- Not showing useless tooltips (#611).
- Respects
class-string<T>annotation when accessing static class members through indirect type. - Property access visibility check.
- Colorize constant values in PHP doc blocks in a uniform color.
- Type inferring improvements,
@globaltag inherited from base if necessary. - Refactoring suggestion
switch->matchonly for PHP>=8 (#2098). - Refactoring and find-references resolving dynamic member access to get better results (#2093).
- Enabled standard inlay hints by default.
Fixes
- Fixes missing code folding that started at the beginning of the file.
- Fixing variables completion inside double-quoted strings.
- Fixes updates to
php.stubsnot being respected. - Fixes updates to
.pharfiles in workspace not being included in IntelliSense. - Fixes align
php.format.rules.alignConsecutiveAssignmentswhen left value of the assignments is multiline expression. #642 - Fixes mouse hover for typed const declaration.
- Fixes false warning for using
@extendson interface. - Fixes (re-enable) quick fixes for unknown class warning.
- Keeps
@internalfunctions in packages cache (i.e. keeps them in IntelliSense).
Stable
1.50.15906
Improvements
- Class constant and enum case checks are correctly case-sensitive.
- Generic type arguments syntax accepts
*token. - PSR-4 checks for
"autoload-dev"rules as well. - Updated integrated PHP manual, adds
SimpleXmlElement::saveXml. - More checks for parameters passed by-ref.
Fixes
- Fixes problem after document rename on Windows, code actions were corrupted after the renaming file with different letter casing.
- Fixes PSR-4 class name and file path checks and corresponding rename code action.
- Fixes invalid type inferring after
is_numeric(). - Fixes incorrect refactoring suggestion of
A ? A : B. Instead?:is correct. - Fixes override checks with implicit nullables,
never, and traits. - Fixes use of
Functionkeyword in a namespace name. - Fixes use of
Collection<T>with just a single generic type parameter.
Stable
1.50.15872
Editor
- Highlighting of names in structured array/object types (#597).
- Highlighting of PHPDoc tag names and reserved type names using
keywordcolor (depends on selected theme) (#612). - Highlights PHPDoc block above trait
use.
PHP 8.4 Support (Preview)
This update adds support for the new PHP 8.4 features, including:
- Property hooks, and
__PROPERTY__magic constant. newwithout parentheses.- Formatting for properties and property hooks.
Formatter Blank Lines Settings
PHP code formatter has a whole new group of settings "Blank Lines" for adjusting blank lines between various kinds of code sections. You can adjust spaces above declarations, class bodies, comments, functions, and more. See the settings for the full list of php.format.rules.blankLines*** options.
Features
"php.docblock.colorMode"user-scope setting allows to simplify colorization of PHPDoc blocks (#612).- Checking for PSR-4 autoload rules, class names, and file names. Quick Fix for PSR-4 file name mismatch (#609).
Improvements
- Adjusted completion sorting for not-imported global types (#598).
- Magic constants (
__METHOD__,__PROPERTY__, etc.) are checked if they are used in a correct context. - Diagnostics improvements, fixes for
try/finallycontrol flow and reachability analysis. - Improved type inferring.
Fixes
- Fixes code folding when there is a HTML folding crossing a PHP code folding. (#594)
- Fixes argument type check for
self. - Fixes use of
@suppressabove function or class. - Fixes an issue causing unwanted spaces after formatting
requireand similar statements. - Fixes an issues when formatting complex expressions in array initializers when using the
php.format.rules.arrayInitializersAlignKeyValuePairssetting. - Fixed an issue where unwanted line wrapping occurred in code blocks during formatting. #2057
Stable
1.49.15728
Improvements
- Doc Comment generated upon typing
/**above declaration. This features does not requireformatOnTypeenabled anymore. - Triggering suggestion after typing
$inside double-quoted strings. - Triggering suggestion when typing a type hint inside a Doc Comment.
- Initial support for
@phpstan-assert,@phpstan-assert-if-true,@phpstan-assert-if-false. - PhpUnit tests discovered in nested directories, and respecting
prefixconfiguration. "source.organizeImports"code action on save won't remove unused uses, as it might not be desirable. (#1883)- Added explicit code actions for
"editor.codeActionsOnSave"setting:"source.source.sortImports": only sorts uses. The same as"source.organizeImports"."source.source.sortAndRemoveImports": removes unused uses and sorts the rest.
- Recognizes unsealed array shape type (#587)
- Blade respects short open tags.
IntelliSense
- Laravel's
Macroable::macro()gets better$thisinferrence inside nested lambda function. @paramcompletion with missing parameter names.
Hints (...)
Code with an available quick refactoring is annotated using three small dots. There is a mouse tooltip with more details and a quick fix which performs the corresponding code action.

Debugger
- Added support for Unicode array keys and property names.
- Debug console provides completion for variable names.
Fixes
- Fixes
Align Propertiesformat rule, ensuring proper alignment even after consecutive formatting actions. - Crash fix when having
@extends parent<>annotation, with template arguments (#585).
Stable
1.48.15635
Improvements
- Improves initial indexing, postpones discovering test cases after indexing is done.
- Optimizations, memory usage improvements.
- Better
ReflectionClass::getMethods()type inference. - Unified logging into OUTPUT panel.
- Implementing abstract functions adds universal
@inheritDocdoc comment. Sort usescode action removes duplicates.
Formatting Improvements
Align Properties
The formatter now provides Align Properties functionality to align the properties within class definitions for improved code presentation and readability. Activate this feature using the php.format.rules.alignProperties option.
class X
{
var $a = 1;
public $bb = 2;
protected $ccc = 3;
}
Fixes
- Function override check respects
#[ReturnTypeWillChange]attribute. - Fixes false unused variable warning about object that is used as an array (#533).
- Fixes code folding when there is
array()or single-lined blocks. - Fixes code completion right after a comment.
- Rename and highlight occurences of private fields fixes.
- Stability fixes.
- Fixes formatting issues when php is mixed within javascript #2012
Stable
1.47.15512
Blade .blade.php Support
- Supports
@usedirective including type aliases. The code completion and IntelliSense recognized imported and aliased classes properly. - Highlighting of
@classdirective and other inside HTML tags. - Opening and closing blade tags highlighted as PHP keywords and HTML begin/end token.
- Improves completion of PHP code, PHP functions signature help, and PHP code folding in blade files.
- Stability fixes.

Diagnostics
- Respects
/** @ignore $variablename */so if the$variablenameis unused, the problem is not reported. - Supports more complex conditional return type, i.e.
@return ($name is class-string<T> ? T : bool)(#538). - Fixes false unreachable code warning (#556).
- Handles checks for
method_existsandfunction_existsto avoid false warning about unknown functions.
New Features
- Infering lambda function parameters type from target
callable()PHPDoc type annotation. - Added inlay hint for infered lambda parameter types. Enable
"php.inlayHints.types.lambdaParameter"setting.

Rename Refactoring
The rename refactoring has been partially reimplemented, new rename scenarios have been implemented, and various cases fixed. The refactoring handles class/const/function imports correctly, template type names, occurences of names in strings and arrays, and more.
New Features
- Renaming aliased type names correctly so when renaming a type alias which differs from the original type, only the alias is renamed.
- Renaming aliased functions and constants behaves correctly now.
- Renaming generic types has been fixed and optimized.
- Renaming imported template types has been implemented. This works for various PHPDoc tags like
@phpstan-import-from,@psalm-type, etc. - Find references to template type names and type names fixed and new scenarios handled correctly.
Please let us know if there any issues with rename refactoring - we're keen to improve.
Known missing features: rename namespace, rename named arguments. Work in progress.
Improvements
- Folding for colon blocks (
if:,switch:,while:,for:,foreach:). - Improves mouse hovers for
by-reffunctions. - Blade formatter indents PHPDoc blocks in
.blade.phpfiles correctly. - Adds selection range inside function header parameters.
- Expanding selection range to corresponding PHPDoc block.
- Generating getters/setters adjust the whole identifier to match
"php.completion.namingConvention"setting. (#2011)
Fixes
- Fixes unwanted space before named arguments which happens to be keywords as well. #555
- All PHP child processes are killed after stopping debug sessions. #542
- Fixes Outline when there is an anonymus
class(#557). - Fixes L-Value variables type in mouse hover.
- Fixes unwatend space after
emptyin lambda function #564 - Resolved an issue where setting or removing breakpoints during an active debug session caused VSCode to incorrectly flag them as unverified.
Stable
1.46.15409
Features
- Inline suggestion after
namespace. - Folding blade blocks.
- Completion for blade tags.
.blade.phpfiles formatting (must be opened as a PHP file).
Blade Formatting
The blade (.blade.php files) code formatting has been implemented. The formatter combines HTML/CSS/JS and PHP pretty print and PHP indentation, together with blade blocks indentation.
There are no further settings (yet). Based on your feedback, we'll be adding more settings and fixes!

Note, if you have another Blade extension, this feature might not be available. Make sure, the language of opened
.blade.phpfile is set toPHP(the lower right corner of your VSCode window).
HTML Auto Closing Tags and Attributes
In PHP code, HTML tag elements now close automatically when you type the > of the opening tag. Similarly, when you enter the / of the closing tag, a matching closing tag is inserted seamlessly.
Additionally, HTML attribute quotes are now automatically included when you type =.
Auto Renaming HTML Tags
Auto-renaming HTML tags is enabled by default now. You can disable this feature using the following setting in your VSCode's settings.json:
"[php]": {
"editor.linkedEditing": false
}

Improvements
- Performance and memory usage improvements.
- Shrink/expand selection works in HTML part of the php files and blade files (
Shift+Alt+LeftandShift+Alt+Right)
Fixes
- Fixes override checks for
staticreturn types. - Fixes inlay hints in
.blade.phpfiles when modifying code.
Stable
1.45.15272
Outlining of Javascript and CSS in PHP files
You can now fold Javascript and CSS code blocks within PHP files, enhancing code organization and readability.
Fixes
Stable
1.45.15260
New Features
- Completion list shows function signatures (experimental) - enable setting
"php.completion.showParameters". - New code action to change
definetoconstif applicable. - Code action to fix invalid casing of
stringPHPDoc type hint. - Diagnostic for possibly wrong
foreachvariables. - Setting
"php.completion.showDeprecated"to control whether to hide or strikethrough deprecated symbols in completion list. They are shown and strikethrough by default.
PHPUnit Test Explorer
The test explorer respects the #[Test] attribute and shows corresponding tests in the list.
Improvements
- Override dignostic respects possible
class_aliasof the type hints. - Override dignostic underlines trait use, it the trait introduces an incompatible method.
- Type inferring improvements.
- Handling some invalid PHPDoc type annotations.
- More quick code suggestions.
- Optimizations.
Fixes
Stable
1.45.15192
Auto renaming HTML tags
You can now rename HTML tag pairs in php files with a single edit. Turn this feature on by enabling editor.linkedEditing in your settings.json:
"[php]": {
"editor.linkedEditing": true,
}
Improvements
- Function hover information displays generic type arguments if any (#1915).
- Improves displaying template type arguments of trait members in hover tooltip.
Fixes
- Fixes unwanted space before parenthesis in
empty,issetorexit(#522) - Fixes possible freezing when code contains complex array initializers.
- Fixes override diagnostics for
Closure-typed parameters. - Fixes parser to allow
namespace private;construct. - Fixes type inferring of inherited template type arguments (#503#comment)
Stable
1.45.15145
New Settings
- php.hover.parametersFullName: show full type names (shortened tu the current namespace) in tool tips.
- phpTools.suppressPremiumFeatures: disables some notifications about premium features like code actions.
Override Diagnostic
Added diagnostics for correct method override (#234), including checks for correct use of #[Override] attribute.
Additionaly, the editor provides quick fixes for common override errors.
Improvements
expectedArguments()from.phpstorm.meta.phprespects class name scoping, use of mixins, and traits. (#1929)- Type inferring improvements.
Fixes
- Automatic
organizeImportsandfixAlldoes not slow down VSCode when premium not active. (#504) - Fixed missing
mixedin code completion. - Fixed some missing Eloquent model functions.
- Fixed structured array doc comment type with
@in an entry name. (#508) - Fixed unwanted space after
returnwhen formatting. #509 - Fixed initial load of Test Explorer (#1934).
- Fixes wrapping of
unsetstatements, it's controled bycallParametersWrapoption. #518
Stable
1.45.15061
Improvements
- Automatic parentheses completion works in combination with IntelliPHP suggestions.
- Improved type inferring and type checks.
- Improved
foreachtype inferring when taking advantage of generic type arguments and _ide_helper. - Blade syntax highlighting for inline tags.
- Code formatter pretty prints PHP code in
.blade.phpfiles. - IntelliSense for eloquent Model classes.
Refactorings
- Concatenation to String interpolation refactoring.
Formatting
Introduced the php.format.declCompactEmptyBody option, which now automatically converts an empty function body into {} and maintains it on the same line as the preceding symbol, separated by a single space.
function foo() {}
Additionally, we've included support for the wrapping option always, ensuring that the appropriate syntax construct is always wrapped.
Fixes
- Fixed semantic highlighting in
.blade.phpfiles. - Updating problems after adding/removing
"php.stubs", or adding/removingext-**incomposer.json'srequire. - Code action to implement interface or abstracts adds correct type hints.
- Fixed rare language server crashes (out of memory, 100% CPU, and crash).
- Fixed unwanted space after function names which happen to be keywords as well #1481
- Fixed formatting that was not working at all.
Stable
1.44.14997
Improvements
- Improved format selection for mixed PHP, HTML/CSS/JS code, improving
editor.formatOnTypeandeditor.formatOnPastebehaviors. - Support for
@psalm-yielddoc comment tag, and infersyieldresult type accordingly. - Diagnostics for
#[Override]attribute. - Support for phpdoc types
trait-string,interface-string,enum-string,callable-string. - Support for
phpcs:ignorecomment.
Tool-Tips Improvements
- Tool-tips show shorter type names (can be changed using
"php.hover.parameters.fullname"setting). - Signature help tool-tips shows
neverreturn types if appropriate. class-stringtype hint fixes.
Fixes
- Highlighs blade tags correctly inside HTML comments.
- Fixed completion of function override.
- Fixed incorrect indentation of multiline expression parts when preceded by line comments.
- Avoids false
6404diagnostic when accessing variable as array. - Updates related diagnostics in other files when a file changes.
- Stability fixes.
Stable
1.44.14950
Improvements
- Automatic format-on-type after typing
default:orcase ... :. - Improves mouse hover for function signatures with more detailed
arraytype specification. - Improves type inferring for
array_rand()andis_array(). - Fixes use of
{{in PHP code. - More Laravel Blade tags supported (
@extends,@can), fixes syntax errors in blade tags.
Stable
1.44.14925
Laravel Blade Editor
This update enables experimental colorization of PHP syntax inside Laravel Blade tags:
- colorize code inside
{{/}},{!!/!!},{{{/}}},@php/@endphp - colorize code in Blade tag expressions, i.e.
@if ( ... ) - colorize blade tags
- colorize blade comments, i.e.
{{-- ... --}}
Additionally, all the nested PHP code gets the standard features including IntelliSense, diagnostics, code actions, code fixes, tooltips, and more.

Improvements
- Automatically formatting code after applying a code action or a code fix.
- Improves array type analysis for builtin
array_*functions. - Understands more doc block tags prefixed with
@psalm-, i.e.@psalm-property,@psalm-readonly,@psalm-trace, and more. - Inlay hint and variable highlighting for doc block tag
@traceor@psalm-trace. .blade.phpfiles overall parser improved - respects@phpand<?phpblocks, respects most documented blade tags and blocks.- Respects
neverreturning functions, function that exits, and function that always throws exception. - Shows tripple dots when code action available.
Code Actions
- Quick refactoring of
ifintoswitchif possible. - Remove unnecessary parentheses, and dim them.
Formatting
We've changed a default behaviour how braces are indented when present directly in switch items. #1897
Fixes
- Fixes an issue where formatter could result in incorrect indentation for complex files containing a blend of PHP and HTML elements. #1881
- Fixes incorrect indentation of comments before class const uses #476
- Fixes a formating case when part of css selector is generated by php #1736
- Fixes tooltip of
neverreturning functions. - Fixes incorrect indentation of attributes in function parameters #1899
- Fixes unwanted removal of new lines when formatting a specific case #1895
- Stability fixes.
Stable
1.43.14858
Unnecessary Parentheses
Parentheses that can be safely removed are dimmed in the code now, and a corresponding code fix "Remove unnecessary parentheses" is available.
Improvements
- Type inferring for generic arguments inferred from lambda return type.
- Formatter handles
@formatter:offand@formatter:ondirectives in comments.
Formatting
Based on user's feedback #395, we've added a new code style for Joomla developers! To enable it set "php.format.codeStyle" setting to "joomla".
Fixes
- Code style (
"php.format.codeStyle"setting) for"drupal"fixed - inserts spaces. - Completion after
::operator fixed. - Avoids triggering completion when typing a new array
[... - Fix of wnwanted space after
caseidentifier #469 - Fixes incorrect occurences highlighting when there are arrays with two empty strings.
- Memory and performance improvements.
- Fixes bug causing constant CPU use, and never-ending devsense.php.ls process.
Stable
1.43.14756
Code Completion for $_SERVER and $GLOBALS
Code completion provides known array keys for $_SERVER and $GLOBALS superglobal variables. Type inferring also takes them into account.

Code Completion for Array Keys
Array keys are listed and completed as possible. This works great with structured array doc comments (e.g. array{name:string,id:int}) and array initializers (e.g. new ['name' => "John, 'id' => 1]).
Code Actions and Refactorings
- Code Action to generate getter/setter for a constructor property.
- Code Action to simplify
isset(A) ? A : B.
Improvements
- Doc Block with multiline
array<>syntax supported. - Doc Block with
@psalm-typedefinition using=character supported. - Doc Block with
@vardefining a type of a whole expression (not just a variable) is handled. - Type analysis improved in case there is a lot of array types with key names.
- Type analysis handles complex L-value of
instanceofoperator. - Type analysis improved in case there are a lot of array types with key names.
- Type analysis for
??operator improved. - Improves handling global variables in WordPress source code.
- Code completion for array keys, type inferring for array entries, and trigering completion after
[. - Inlay hint for variables by reference (
&) and expressions type won't be inserted on double-clicking. - PHP language level respects
composer.jsonif no specificphp.versionis set.
Formatting
- Implemented chained method calls wrapping based on user request (#1868). Currently, only the
alwaysoption is allowed for this setting. - Added the ability to specify the placement of the semicolon on a new line when method chaining wrapping applies.
Debug
We've added maxConnections launch setting to control the maximum number of simultaneous debug sessions. #353
Fixes
Stable
1.42.14626
Improvements
- Improved
array_unshift()type analysis. - Refactoring of
privateproperties. - Refactoring of property names specified inside
property_exists()function. - 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.
- Tooltip for variable annotated with
@varwith inline description. - Workarounds diagnostics in incorrectly generated type names in
_ide_helper.php. - Diagnostic for
${}deprecated string interpolation and corresponding code action. - Diagnostic for redundant closing
?>tag and corresponding code action.
Fixes
- Updated PHP parser to handle keywords in PHP8+ FQN namespace syntax.
- Startup fix when opening a workspace from
ftp://remote using some FTP extensions. - Fixes falsy diagnostics of unreachable code.
- Not reporting unknown property if it was checked with
property_exists(). - Fixed inlay hints in ambiguous function calls (function defined on two places or opened in two files).
- Crash fixes.
Stable
1.42.14434
PHP Stubs UI
Adding a quick command > Workspace Stubs which popups quick selection of stubs (PHP books and other stubs including "WordPress") to be available to IntelliSense and Code Analysis.

"source.fixAll" Action
Safe quick fixes, such as simplifying a name, can be auto-fixed on file save. Use the following settings to apply safe quick fixes on file save:
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
}
Debug
Breakpoint Resolution
Improved breakpoint resolution by validating breakpoint locations through information from Xdebug. Notably:
- Bound breakpoints are highlighted in red.
- Unbound breakpoints are visually distinguished in grey.
- In cases where a valid location close to the breakpoint couldn't be bound, the breakpoint is automatically adjusted to the valid location.
xdebug_notify Support:
Added support for xdebug_notify(), enabling the sending of information and objects to the debug console. This feature enhances the debugging experience by facilitating the communication of relevant data directly to the console.
Error and Warnings
We've implemented the output of PHP warnings and errors to the debug console. This approach provides a centralized location for developers to monitor and address issues during debugging sessions.
Improvements
- Quick Fix for missing function
use. - Added
php.stubsfornewrelic. - Implicitly includes PHP stubs from
composer.jsoninto IntelliSense and Code Analysis. - More complex PHP executable: This allows using a remote
php, or a custom command to runphp. Settingsphp.executablePathorphp.executablescan have a command with arguments (i.e.ddev exec php). NOTE: double-quotes might be needed now. - PHPUnit path can be absolute: Put the setting
phpunit.phpunitinto double-quotes to keep the path to your custom phpunit as it is, i.e."phpunit.phpunit": "\"phpunit\"". - PHPUnit command can be customized: Using new setting
phpunit.commandyou can customize the command to run PHPUnit etirely. Use variables for customize the command:${cwd}: workspace root path, local. The command will be executed in this directory.${phpunit}": path to phpunit binary. It's automatically resolved or it can be cutomized withphpunit.phpunitsetting.${phpunitxml}: path to the phpunit.xml relative to the workspace root.${phpunitargs}: constructed PHPUnit arguments. (we need --teamcity and --filter to function properly)${phpargs}: optional arguments to PHP which we use to ensure PHP runs and debugs correctly.
Formatting
In response to feedback from you (source) we've implemented two additional options aimed at enhancing code formatting flexibility:
Keep Functions on a Single Line
Introducing the `php.format.rules.keepFunctionsOnOneLine`` option, which allows users to instruct the formatter to refrain from wrapping functions or methods if they are on a single line. This empowers developers to maintain a concise and consistent coding style.
Keep Classes on a Single Line
With the new `php.format.rules.keepClassesOnOneLine`` option, you now have the ability to prevent the formatter from wrapping classes when they are on a single line. This feature supports the preservation of a streamlined and compact structure in your codebase.
Fixes
- Code Action to sort and remove
uses fixed, when in a global namespace. - Improves resolution of methods returning
static/$this(#1820). - Inlay hints position fixed, when editing code near them.
- Fixed Go To Source in Test Explorer.
- Rename refactoring shows Preview when change might be dangerous.
- Rename refactoring handles constructor properties propertly (#450).
- Various code analysis improvements.
- Workarounds for various
_ide_helper.phpbugs. - Fix of conditional breakpoints. Previous version broke this feature in certain cases.
- Fix code action to implement interface with
staticfunctions (#446). - Fix of incorrect formatting in nested associative array with multiple functions (#432).
- Fix for the
invalid or missing optionswarning when starting a debugger with an older Xdebug version #1816
Premium
- Note: Code Actions, and Code Fixes are available in PREMIUM. It may have worked unintentionally without a license before this update.
Stable
1.41.14263
Formatting Improvements
Comments
In this update, we've made improvements to how comments are handled. Now, comments that follow after an expression are preserved in their original positions, giving users the flexibility to indent them as they prefer.
$x = [
1 => 'one' // first comment
42 => 'fortytwo' // second comment
]
Align match arm bodies
The formatter now offers "Align Match Arm Bodies" to align the bodies (results) within match expressions for enhanced code clarity and structure. Enable this feature with php.format.rules.alignMatchArmBodies option.
match ($day) {
'Monday' => 'Work',
'Tuesday' => 'Tacos',
'Wednesday' => 'Waffles'
};
Doc Comments and Type Annotations
-
Structured
objectType: dynamic objects can be annotated within doc comment usingobject{property:type,}syntax. -
Global
@typeAliases: type aliases can be defined in the scope of the entire file using doc comment@type,@phpstan-type,@phpstan-import-type,@psalm-type,@psalm-import-type. Previously, it only worked above classes and functions. Now it is also valid in a doc comment/** */anywhere in the global file scope. -
Code Actions for qualified names in doc comments (#428)
-
@method syntax with modifiers is supported, i.e.
@method public static foo(). This is an unusual syntax, although we do understand it now.
redis Stubs Added
"redis" can be added to your "php.stubs" VSCode setting. This adds type checking and IntelliSense for using the redis extension.
Diagnostics in Rename Preview
When renaming a symbol with preview (F2, Shift+Enter), newly the preview window gets analyzed and errors and warnings are underlined.
Debug
Random Xdebug Port
As of now, specifying "port": 0 in your launch.json is treated as a random available port. php is started automatically with the corresponding xdebug.port = ${port} directive. By default, the port is already chosen randomly if you don't specify anything. Most of Run & Debug commands simply work now.
The sample launch configuration, which starts Built-In Web Server, initiates debugging, and opens the browser:
{
"name": "Launch Built-in server",
"type": "php",
"request": "launch",
"runtimeArgs": ["-S", "localhost:8888", "-t", "public"],
"port": 0,
"serverReadyAction": {
"action": "openExternally"
}
}
You can also omit "port": 0, completely since it is a default value for this launch configuration.
Note, default ports when just listening for Xdebug are still
[9003, 9000].More at: https://docs.devsense.com/en/vscode/debug/launch-json#built-in-php-server
Quick launch commands (pressing F5 without having launch.json) uses random available Xdebug port as well. There is nothing you need to do.
Expression Evaluation Enhancement
Now, expressions can be expanded into deeper levels in various contexts, including the Debug Console and Watch Window. Enjoy enhanced debugging with improved evaluation results.
Run/Debug current PHP File
Now, you can run or debug the currently opened PHP file with quick Run/Debug buttons in the top right corner of the editor.
Fixes
- Fixes the wrapping behavior, ensuring that comments are maintained on their original lines when they follow an expression. #1760
- Fixes
php.inlayHints.parameters.suppressNameMatchingValuesetting. - Fixes code indentation after applying "Implement abstracts" code action.
- Fixes
usecode action insideenum. #425 - Fixes web extension running in browser (vscode.dev).
- Fixes navigation and completion in
@seetag when in a namespace. - Fixes LS crash (stack overflow). #427
- Fixed unwanted space removal between
readonlyand type in property promotion #433 - Improves mouse hover tool-tips in case there are ambiguous symbol declarations.
Stable
1.40.14103
Introducing IntelliPHP 🚀
We're thrilled to announce, that PHP extension bundles with IntelliPHP now.

IntelliPHP: Your Local PHP AI - provides whole-line suggestions as you type, instantly. Complete the suggestion with TAB key and be more productive! Read more ...
Minor Features
"php.inlayHints.insertOnDoubleClick"setting to enable or disable inserting the inlay hint on double-click (#1717).array_multisort()does not treat the first argument as strictly passed by reference (#1729).- go to and code completion of file paths improvements (#1735).
@seeand@exceptionin tool tips.list{}doc comment shape.
Formatting
New PHP 8.3 syntax is supported by the formatter.
Final New Lines
By default, the formatter will no longer trim final new lines. Final new lines will be preserved as they are. However, if you have files.insertFinalNewline enabled and a final new line is missing, the formatter will automatically add one for you.
Fixes
- Fixed installation on code-server and GitHub CodeSpaces.
- Fixed
vendorfolder with recursive symlinks (#1720). - False named argument error in case the method accepts variadic arguments (#1722).
- Fixed possible stackoverflow and language server crash (#1724).
- Fixed analysis of generators return type.
- Fixes improper formatting when named argument as a keyword #408
- Fixes incorrect indentation inside constructor #409
Stable
1.39.13943
Class Name Inline Suggestion
Newly, when typing a new class, the class name is suggested based on the file name. The suggestion takes advantage of the Visual Studio Code's inline completion UI, so it's non disruptive; accepted with TAB key.

In combination with IntelliPHP, the inline code suggestions are even more detailed and powerful!
Completing File Paths
Since this update, the editor is completing and navigating to files #402.

Fixes
- Old-style
composer/installed.jsonfile supported. - Fixes some formatting issues that occurred when mixing PHP with HTML.
Stable
1.38.13918
Setting for Getter/Setter Naming Convention
Added setting for naming convention of generated getters and setters.

PHP 8.3 Syntax
Adding support for PHP 8.3 syntax features including:
- Typed class constants
- Anonymous readonly classes
- Dynamic class constant fetch
Formatting
In response to user feedback(#384, #1691, #684), we have introduced additional formatting options that allow users to precisely control the automatic placement of commas in their PHP code.
These new options include:
php.format.rules.addCommaAfterLastArrayElement: Adds a comma after the last element in an array.php.format.rules.addCommaAfterLastCallParameter: Adds a comma after the last parameter in a function call.php.format.rules.addCommaAfterLastDeclParameter: Adds a comma after the last declared parameter in a function or method signature.
In addition to the above, we've also introduced the following formatting options:
php.format.rules.booleanConstantCasing: Defines casing fortrueandfalseconstants.php.format.rules.nullConstantCasing: Defines casing fornullconstants.
Fixes
- debugger handles file paths with
%character #380 - caching /vendor/ fixes
- problems gets updated after composer updates
- memory use optimizations
- avoids showing keyword tooltip if it's not a keyword
- avoids showing duplicit items in peek window
- When using Drupal code style, the formatter changes all True/False/Null constants to upper case. #870
- When multiple changes to settings changes for formatting or inlay hints were performed at once, only the first change was considered; subsequent changes were ignored.
- Resolved formatting issue related to the PSR-12 coding standard for multi-line argument lists. The closing parenthesis and opening brace are now correctly placed together on their own line with one space between them, in accordance with the PSR-12 standard.
- More fixes of code diagnostics and IntelliSense.
- Array initializer values are now formatted with an additional level of indentation. #935
- Fixes other formatting issues related to multi-line array inititializers.
- Stability fixes.
Stable
1.38.13779
Fixes
- sticky scroll #387
- tooltip for
defaultcase #1692 - tooltip for attributes
- fixes type analysis of parameters without type specified
- fixes problems analysis setting
- caching of /vendor/ fixes
- fixes use of
staticin /vendor/ files #389 - fixes temporary cache incorrectly created in the workspace X/1697612088196137243
Stable
1.38.13759
Optimized Loading and Memory Use
With this update, we're starting to cache composer.lock with vendor folder. This significantly improves opening workspaces based on Composer packages, and drops the RAM usage to bare minimum.
For our insiders, see your OUTPUT / PHP Language Server panel for what it's doing.
Inlay Hints for Attributes
Newly, attributes above classes will have inlay hints with parameter names (#383), if enabled.
scalar_objects Support
Thanks to the suggestions #378, we're adding native support for the scalar_objects extension by Nikita Popov.
The editor recognizes register_primitive_type_handler() calls, and allows completion for specified scalar types.
Formatting
In direct response to user request we've added formatting options to align constants php.format.rules.alignConstants and enum cases php.format.rules.alignEnumCases. Maintaining consistent alignment is now effortless:
class X {
const a = 1;
const bb = 2;
const ccc = 3;
}
Code Analysis in Virtual Files
We have enabled full code analysis for files that are virtual - i.e. diff views, peeks, git preview, etc. This allows to analyse for changes you're about to submit easily!

Outline with Symbol Details
Thanks to the suggestion #109, we have added more details to the document outline. It shows methods access, class access, and interface, trait, enum kinds.

Fixes
- Fixes lag when closing VS Code or a Workspace.
- Fixes
usestatements sorting. - Fixes go-to-def of a method defined in a
trait. - Fixes
@psalm-import-typephpdoc tag support. - Fixes inlay hints when there is a
newwithout parameters. - Fixes rename refactoring of static methods.
- Optimizations.
- Fixes formatting issues that occurs when using reserved words in namespaces, such as default
Stable
1.37.13534
Completion Namespace Label
Newly, the code completion shows namespaces next to class names. This feature is enabled by default, and can be controlled with "php.completion.showNamespaceLabel" setting.

Completion Colored Details
The code completions popup is formatted and colorized as well.
IntelliSense
- Class name completion in single-quoted strings has been added.
Fixes
- Fixed infinite RAM usage (#343)
- Fixed array not automatically aligned #364
- Duplicit warnings have been fixed.
- When Folding HTML tags, the closing tag stays visible. #363
- Fixed removing spaces for variadic arguments #1639-2
- Resolved multiple issues pertaining to the nesting and combination of HTML tags with PHP tags. #1634
Stable
1.36.13417
Debugger & trigger Setting
New launch setting "trigger" allows to control whether to debug or ignore certain requests.
{
"name": "Debug built-in server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-S",
"localhost:8000",
"-t",
"./public"
],
"trigger": "THIS",
},
The launch.json setting above will start the built-in Web Server, configure all the Xdebug directives, and waits for requests. Only requests with the GET parameter XDEBUG_TRIGGER=THIS will be debugged. Any other request will be ignored by the debugger. I.e. request to http://localhost?XDEBUG_TRIGGER=THIS will initiate debugging, but http://localhost will not.
IntelliSense & IteratorIterator
IteratorIterator and RecursiveIteratorIterator are extended with generic type argument TInner, @mixin TInner, and their __construct() infers this TInner. Therefore, IntelliSense knows the inner iterator type and so it can provide inner iterator's members. (#1613)
New IntelliSense Features
@phpstan-typeand@phpstan-import-typeare supported (#1543).phpstan.neon(and.distalternatives) in containing directories processed; supporting their global type aliases (phpstan.neonfile's"typeAliases"setting).- Handling
Collection<TValue>,Iterator<TInner>correctly. - Undefined properties accessed with magic
__get()reported with lower severity. - Fixes trait adaptation and class inheritance analysis. Classes with complex inheritance with trait
usewith adaptation are analysed correctly giving unseful insights about missing method implementation. - Fixes control-flow analysis of certain
try/finallyblocks. - Improves Laravel IntelliSense.
Namespace Auto-Import
There is already namespace auto-import feature, which seamlessly adds correspding use or fully-qualifies names when using code completion. There are also code actions where you can choose a new namespace to import. Additionally we're adding commands Import class ... and Fqn class ... to import a namespace using command bar (F1) and quick-pick window (#450).
Stability Fixes
- Memory leak when having
.pharfiles in the solution has been fixed.
Stable
1.35.13327
Organize Uses
The action known as Organize Imports can be invoked anywhere in source code now (#349). Removing and Sorting use statements affects the entire block of code, not just a single line.
Composer
Path to composer.phar can be set explicitly using the setting composer.bin. Also, resolving composer.phar has been improved so it mostly uses your own already installed composer. Otherwise, if user does not have composer installed, it gets downloaded and used seamlessly, witnout the need of doing anything.
Refactoring
Trait function members are resolved in semantic highlighting, finding references, code lenses with method overrides, and rename refactoring.
Debugger & Phar
The extension parses and understands .phar files. Since this updated, debugging and stepping through a code inside a .phar file works. Phar file is decoded, opened, and current statement highlighted as it would be a regular .php file. Local variables can be also inspected and inline debug values works as well.
Stability
This update fixes an issue related to the process not being terminated when code gets closed.
Stable
1.34.13295
IntelliSense & @phpstan-type and @psalm-type
Since now, we have a basic support for local type aliasing.
IntelliSense & Traits with Generics
Newly, trait use can be annotated with @use doc comment to specify the trait's generic arguments (#840), i.e.:
class MyClass {
/** @use MyTrait<int, string> */
use MyTrait;
}
IntelliSense & static Type
We have reimplemented the internals and improved type analysis for various cases involving use of static and $this within traits, protected properties, and class inheritance in general. Moreover generic arguments and trait members are resolved better with more inherited type information (#931).
PHPUnit Tests & Continuous Run
Newly it is possible to run tests continuously. The watch icon in Testing panel allows to keep all the tests, test suites, or just specific test cases always up-to-date. (#1479)
Minor Improvements
- Code completion of named arguments completes the
:at the end. (#1600) - Code completion of hinted array keys within single quotes. (#1600)
- Completion triggered after typing SPACE after
instanceofkeyword.
Fixes
- Fixed a few memory leaks!
match,fn, andinterfaceare not reported as syntax errors when within a qualified name (PHP 8.0+).- PHP 8.2 standalone
true,false, andnulltype names. (#338) - Fixed a few type inferring cases.
- Fixed reporting functions annotated with
@ignoretag as unknown. - Type hinting through
/** @var */aboveiffixed. - Fixed check of
define(). (#340) - Fixed issue causing removal of new lines when formatting after abstract method. #1525
- Arrow functions now respect php.format.rules.spaceWithinDeclParens to add spaces within parentheses. #1536
- Fixed unwanted space when function is named as keyword #335
- Do not increase indentation if previous sibling node ends on the same line #333
- Fix of array items aliging when keys are not simple literals #1602
Stable
1.34.13120
IntelliSense
Trait Adaptation Blocks
Code completion and tool-tips in trait adaptation blocks have been implemented. (#582)
Other Improvements
- Type inferring in the context of
is_a()analyzed correctly. - Less falsy warnings for non-static methods called statically in case there is
__callStatic()magic method. - New quick refactorings through code actions.
- Updated integrated PHP manual and localizations.
Add Missing PHPDoc
The Add Missing PHPDoc code action inserts the doc comment as a snippet (#157(comment)). This replaces template variables and allows you to type into placeholders.
Formatting
We've added an option that enables you to turn formatting on or off within a specified range of code. The code between a comment // @php-format off or /* @php-format off */ and a corresponding comment // @php-format on or /* @php-format on */ will not be formatted.
Additionally, We've added a new option php.format.rules.declKeepRightParenAndOpenBraceOnOneLine which will keep the right closing parenthesis ) of a function or method declaration header on the one line as opening brace of the body {.
The other options that allows for more formatting customizations include:
php.format.rules.openBraceOnNewLineForNamespaceswhich place open brace{on a new line for namespace declarations.php.format.rules.openBraceOnNewLineForBlockswhich place open brace{on a new line for all types of code blocks, except for those controlled by other formatting rules.php.format.rules.spaceBeforeParenthesesInControlStatementswhich insert a space before parentheses in control statements.php.format.rules.spaceBeforeParenthesesInCallswhich insert a space before parentheses in method, function and constructor call parentheses.php.format.rules.spaceBeforeParenthesesInDeclarationswhich insert a space before parentheses in method, function and constructor declaration parentheses.
Inlay Hints
We've added an option to show return type inlay hint only for named functions, not for anonymous functions and arrow functions (#326).
Fixes
- Respecting
class_alias()within type checks and type inferrence checks. - Respecting
@return $thisand treating it asstaticreturn type hint. - Respecting
"php.completion.autoimport-docblock"setting when generating PHPDoc above functions (#896). "mongodb"stub updated and fixed some missing MongoDB classes and functions. Use setting"php.stubs": {"*", "mongodb"}to use it (#927).- Find All References performs type analysis if necessary to provide better results (#322)
- Fixed use of named parameters of methods introduced with PHPDoc
@methodtag (#921). - Properly handling the nullable
?statictype. - Code diagnostics improvements, avoids a few falsy warnings.
- Fixes internal error when completing user snippets.
- When multiline php code was present inside javascript string, formatting wasn't working correctly #908
- Fix of incorrect indentation when named arguments were used in multi-line static function calls.
- Fix of unwanted compacting of new lines when multiple foreach colon blocks were used. #893-12
- Fix of incorrect indentation of named arguments in certain cases #928
- Fix of incorrect indent of pseudo class constant #932
- Fix of formatting when php was inside script/style tags. #1460
- Fix of lossing indentation in multiline comments delimited with
/*#1489 - Fix of formatting removing empty lines in
/*comments #1522 - Fix of incorrect indent in multiple nested multiline lambda functions#1500
Stable
1.33.12934
IntelliSense
Supporting .phpstorm.meta.php with expectedArgments() and argumentsSet() now.

Fixes
- Formatting was compacting whitespaces after arrow or lambda functions (#913).
- Internal exception fix when navigating to definition ("Go To Definition" command).
- Crash fix for rare cases in huge files in Drupal.
- Added the missing
statickeyword in code completion in function body. - IntelliSense/Code analysis handling
iterable<K,T>(with 2 generic arguments) the same as PHPStan does (#914).
Stable
1.33.12924
Test Explorer
The Test Explorer looks and watches for any PHPUnit XML configuration file matching glob pattern **/phpunit*.xml or **/phpunit.xml.dist (outside the vendor folder) #313. This allows having multiple configuration files in the same directory with custom names.

Additionally, we have fixed:
- Executing all tests within a configuration file.
- Executing all tests within a single test suite.
- Correct Xdebug directives so it won't cause unnecessary warnings when debugging tests.
ParaTest
This update allows running ParaTest in the same way as PHPUnit tests. To do so:
- Install ParaTest composer package using the command
Composer: require dev package, and search packagebrianium/paratest. - Update your workspace settings:
{ "phpunit.phpunit": "./vendor/bin/paratest" } - Navigate to Testing panel and run or debug your tests.
Sort Uses on Save
The following setting works for sorting and organizing use statements on save:
{
"editor.codeActionsOnSave": { "source.organizeImports": true },
}
IntelliSense
Now it's possible to Ctrl+Click (or go to with F12) on @inheritdoc to navigate to base Doc Comment directly. #897
Additionally, return type hint in signature help is respecting template (generic) arguments.
Composer "composer.workingPath" Setting
Thanks to the feedback #909, we've added setting "composer.workingPath" where users can specify the relative path for the composer.json and vendor folders.
Fixes
- Memory leak happening when updating/removing
.pharfiles in the workspace fixed. (happens usually oncomposer updateandrequire.) #291 - Not auto-completing parentheses
()afterarray,require/include,exit, anddie. - If a multiline HTML attribute was enclosed in single quotes and located within a PHP blocks, it would be indented during every formatting session. 882
- Fixed rare case when mixed html/php formatting resulted stopped the formatter. 887-B
Stable
1.32.12895
IntelliSense
nullspecified as Doc Comment@paramtype is reported as invalid.truepseudo-type correctly handled within union types.- Methods named
new()are handled correctly in mouse hover and code completion. - Detecting Laravel services improved.
- Initial implementation for
expectedArguments()PHPStorm meta. - Completing
declareanddeclare(strict_types=1);after<?phptag.
Refactoring
- PHPDoc
@seeand@usesis recognized during rename refactoring, find all references, and highlight occurrences. - Unused
usecheck works even if problems setting is turned off. - Namespace import for any simple class name. We have code action suggestions to import a namespace or fully qualify the class name if there are more classes with the same name.
Organize Imports
We have added support for VS Code's "organize imports" command and eventual "editor.codeActionsOnSave" setting allowing you to organize imports (aka remove unused uses) when saving documents automatically.

Fixes
- Stability fixes.
- Smart select fixes.
#!at the beginning of file not reported as syntax error.- Properties on some
mixedtypes not reported as unknown. - Format supports indenting PHP8 attributes which are spread over multiple lines #879
- Format was removing whitespaces when
readonlyorstaticwas used as function argument name. - Fixed the case where formatter was adding an extra space between
newand()#883
Stable
1.31.12821
Fixes
- Breadcrumbs fixed. (#302)
- Unrecognized Psalm and PHPStan special type names. (#860)
- Global variable type check fix (#303)
- Mouse hover looks into
@mixins for properties. - IntelliSense: Methods from both Laravel facade and DocComment
@methodgets resolved as expected. - Fixes
rgprocesses spawned by VS Code (#877). - Fixes a complex html/php mixed formatting issue. #852
- Fixes incorrect indentation of multi-line chained call. #862
- Fixes position of open brace in method or function declaration when multiline header is provider in
PSR-12. #305 - Fixes unwanted newline after lambda function passed as an argument to a method or function. #306
- Fixes formating of enums with backing types implementing interfaces.
- Fixes indentation of named arguments when function call is multiline. #863
- Format selection didn't work in certain cases when invoked with html/php mix.
- Format doesn't indent php code block in html comments #872-3
Stable
1.31.12740
Inlay Hints
Newly Inlay Hints for PHP code are available!

The inlays are available for parameter names, by-reference arguments, and inferred function return types.

To enable or disable the inlay hints, change the following settings:
"editor.inlayHints.enabled""php.inlayHints.parameters.enabled""php.inlayHints.parameters.byReference""php.inlayHints.types.return""php.inlayHints.types.variable"
See the documentation for more details.
Quick Fix for missing Doc Comments
New code action adds missing doc comments with inferred type information and summary placeholders. The functionality is the same as by typing /** above a function/class/property/constant or define() call, but it can be invoked through a code action and it can be invoked over a whole selection of code for multiple declarations at once. (#226)
Smart Select
Visual Studio Code's selection range feature allows to quickly select syntactic elements; the PHP extension provides selection range for all the statements, declarations, and blocks of code.
Formatting
Another feature request we received quite often was to introduce Drupal code style #795. So we're happy to announce Drupal code style has been introduced in this version.
Formatter respects files.InsertFinalNewLine option now. #837
Fixes
- Fixes highlighted range when peeking definitions (#288)
- Fixes some internal exceptions.
- Fixes mouse hover when code is syntactically invalid.
- Fixes "Search TODO" command if there are remote:// or git:// files in the workspace, possibly after using git merge, or diff window.
- Fixes indexing directories inside
.gitand other special directories when changed. - Types specified in Doc Comments can be
$thiskeyword as an alias toself, i.e.callable($this)(#843).
Formatting Fixes
- Fixes formatting when multiple method calls chained when object was inside parenthesis.[#820/8].(https://community.devsense.com/d/820-heredoc-with-interpolated-variables-breaks-auto-formatting-for-the-entire-file/8)
- Fixes formatting of mixed JS and PHP. #820/5
- Fixes case when JS formatting with php code inside was moving
}on each format. #820/7 - Fixes case when insides of multi-line HTML attributes, comments or CDATA were indented on each format. #820/12
- Fixes case when linux line endings caused different format output when mixed languages were present in php file.
- Fixes case when
usewith alias same as class stopped the formatter. - Fixes double indentation when array access and member use is combined in multi-line expression. #842
- Fixes unwanted space after ampersand in ref assignment #846, but in the same time respects this notation as well
$a =& $b;. - Fixes unwanted double indentation in multiline expression containing array item access.
- Fixes unwanted new line when line comment precedes
elseif,catch,finally. - Fixes unwanted space between
staticorselfand(when creating a new instance of the object. - Fixes formatter removing spaces aroung bitwise
&operator. - Fixes unwanted double indentation of object's field access in constructors calls when spread along multiple lines.
- Fixes
php.format.rules.alignConsecutiveAssignmentswhen combined with different kind of left expressions. - Fixes missing space when reseved types were used as a type hint.
- Fixes incorrect commend indentation when used in multiline chained function calls.
- Fixes ocassional missing space after
)whenphp.format.rules.keepControlStatementsInOneLineoption is used. #852-2 - Fixes unwanted space in multiline ternary operator.
- Fixes unwanted space after function with the same name as PHP keyword.
- Fixes static member access double indent when
statickeyword was used. - Fixes incorrect indent when member was accessed in multiline constructors call.
- Fixes unwanted space after identifier named
default. - Fixes case when attributes in function declaration parameters stopped the formatter.
- Fixes case when trait use in namespace might have stopped the formatter.
- Fixes case when trait use with changing visibility to public stopped the formatter.
Stable
1.30.12484
Fixes
- Code Formatter fixes.
- Fixes various standard functions missing, and missing ambiguities.
- Homebrew
phprecognized on macOS. - Fixed formatting of heredoc with interpolated variables #820
Stable
1.30.12450
Editor
Folding use has been added; this allows to collapse the block of use statements (tweet).
Getter/Setter
Newly, code inserted by adding getters and setters can be customized using settings "php.completion.getterSnippet" and "php.completion.setterSnippet". In this way, you can add various value handling and customize return values, or add comments for yourself (#813), i.e.:
"php.completion.setterSnippet": "{PROPERTY} = sanitize(${NAME}) ?? throw new InvalidArgumentException('Invalid ${NAME}!');\n//done\nreturn {THIS};",
Formatting
-
Backed enumerations are supported.
-
New setting
php.format.rules.keepControlStatementsInOneLine. #810 -
Setting
php.format.rules.SpaceBeforeColonInControlflowStatementsrenamed tophp.format.rules.SpaceBeforeColonInControlStatements. -
Fixed unwanted space in type declaration #271
-
php.format.rules.alignConsecutiveAssignmentsnow aligns only assignment if they directly follow each other. Inserting a new line between assignments will force them to align differently.Fixes
-
Documents opened in diff view won't appear twice in symbol searches and symbol navigations (#549).
-
Fixes symlinks recursion on Unix (#269).
-
Fixes blank What's New screen.
Stable
1.30.12417
Doc Comments
Supporting literals and constants inside Doc Comments (i.e. inside key-of<> and value-of<>), so the type information in Doc Comment is parsed and IntelliSense works inside it (#801).
Diagnostics
- Duplicate promoted property reported.
- Reports modifying read-only properties.
- Reports use of undefined property if there is
__get/__setbut also@propertydoc comment declaration. - Added diagnostic for unknown attribute class.
Rename Refactoring
Renaming a class, interface, trait, or enum suggests to rename the corresponding file as well, if appliable.
Hover Tool-Tips
Newly, there are two more settings to configure the hover tool-tip.
"php.hover.fullname"adds the full class member name at the top of tooltip (including the fully qualified name of the class) (disabled by default) (#808)."php.hover.containingClass"lets you to enable/disable showing class name as a part of a function tool-tip (enabled by default).
Fixes
- Overall workspace processing time (source code parsing) has been optimized.
- Added missing
ZipArchive::constants (#256). - Constants defined inside lambda functions are shown in IntelliSense, and code diagnostics (#257).
- Rename refactoring and semantic highlighting of constructor promoted properties.
- Context-aware completion after
extends/implementskeywords. - Fixes
"Problems: Exclude Git Ignore"in case there are many.gitignorefiles in the workspace. - Fixes use of
@globaltype defined above function declaration. - Fixes generating Doc Comment upon
/**above trailing comma (#265) - Fixes updating problems and code analysis when using
includePathoverlapping the workspace path(s).
Stable
1.29.12304
IntelliSense Improvements
Respecting @internal annotation
Symbols annotated with @internal doc comment tag are hidden in the completion list now;
Correct ordering
We have updated how the code completion is ordered depending on context and so-far typed text; Symbols from imported namespaces are listed first, then top-level symbols, and at the end there are symbols that can be auto-imported.
Deprecated classes
Additionally, deprecated classes and interfaces are striked-out in the code completion list, and when used in the source code. Previously, we did that only for functions.

Performance
More frequent operations have been moved to a background thread to make the user experience fluent and uninterrupted.
Short Open Tags <?
We have enabled parsing of PHP code inside short open tags (<?) by default. It handles the case where <?xml is at the beginning of the source code;
Parsing inside short open tags can be disabled using the setting "php.workspace.shortOpenTag".
Composer
The local development version of composer.phar is updated automatically every 30 days.
Fixes
- Missing
pcntlconstants added to IntelliSense. - Fixed
#region/#endregioncollapsing. - Fixed collapsing in various situations.
- Fixed update of IntelliSense after
composer update. - Fixed incorrect
integertype name shown in tool-tips. - Fixed renaming of global variables (#242)
- Fixed warning message on non-en localizations (#249).
- Fixed missing unreachable code warning in
switchstatement. - Fixed missing
Exceptionclass in the completion right afterthrow new. - Fixed auto-import when there is a syntax error (#671).
- Formatter does not remove space after
yield from(#248). usewith leading/stopped the formatter.- Colon block ending with
;separated with whitespaces from colon block closing token stopped the formatter.
Stable
1.28.12200
New Code Actions
More useful refactorings are coming to the PHP extension and VS Code. Following are refactorings introducing common PHP 8 syntax to your code.
Condition ?: can be replaced with ?->
Simplifying conditional expressions like the one below:

Assignments can be simplified
Simplifying assignments:

Converting switch to match
In certain cases, switch statement can be converted to the new match expression.
PHPStan Conditional Return Types
This update adds support for the new PHPStan's Conditional return types. Return types specified in this way are properly recognized now, colored accordingly right in the source code, and the IntelliSense uses the specified types correspondingly.

Improved Type Checks and IntelliSense
BREAKING: By default, we're now reporting diagnostics inside opened documents only. This can be changed using setting "php.problems.scope". The exception is the syntax errors - those are reported from across the whole workspace.
In addition, various falsy warnings have been fixed, mostly in combination with generic types. The type analysis have been improved in general.
Also, most of polyfills are not messing up with codecompletion and symbol navigation; Since built-in manual is annotated with generic type arguments, it is preferred over the polyfills from 3rd party packages (#241).
Improved Completion Ordering
The code completion itself has been improved, so local symbols should be listed first. We're still working on this feature, and improving as much as possible.
Fixes
- We have fixed a memory leak, and the language server crash.
- Fixed PHPDoc snippet after typing
/**, when text got corrupted. - Added missing Psalm scalar type annotations.
- Correct order of resolving
@mixinmembers (#777). htmlfiles can be associated withphplanguage support.//region///endregionfolding (#788)
Formatting
- Removing unwanted extra space after
?token in nullable return type #752 - Fixes in Wordpress code style
- Types and function declarations have do not place a open brace
{on a new line Unsetcalls weren't formatted with spaces within parentheses.exit()ordie()do not have a space within parentheses.
- Types and function declarations have do not place a open brace
php.format.rules.alignConsecutiveAssignmentsstopped the formatter in certain cases.- Using not equal operator
<>instead of!=stopped the formatter. - Optional comma in constructor header in property promotion stopped the formatter.
- Certain situations when combining HTML and PHP stopped the formatter.
- When
caseinsideswitchwas followed by;instead of:stopped the formatter.
Stable
1.27.12010
Doc Comment Syntaxes
We've been working on recognizing the whole range of commonly used type syntaxes in Doc Blocks; now supporting the most of PHPStan, and other popular linting frameworks.
This release introduces more compatibility, and more features towards Doc Blocks, and related type analysis and code diagnostics.
Colorization and Semantic Tokens
PHP Doc Comments are getting very complex, and frameworks like PHPStan add even more syntaxes and complexity. We're supporting most of the extended syntax, including generic types, templates, type aliases, unions, intersections, callable syntax, and array shapes; and in this release, those types in documentary comments are colorized accordingly.

The whole type expression is now parsed, colorized, and recognized. The tooltip shows the signature help displaying the Closures arguments and return types.
Note: a nicer tooltip is in progress!
PHPStan Array Shape, callable, list, and more
Since this release, the editor supports all the syntaxes for array shapes and callables. In addition, the type analysis handles specified PHPStan types accordingly.
PHPStan and Psalm array shapes specified in PHP Doc Comments are allowed, parsed, colorized, and used in code completion and type analysis.
Additionally, list and non-empty-list types are handled as well. Including their generic counterparts with < and > types specified.
All the callable syntaxes in PHP Doc Comments are supported now as well.
More Generic Annotations
This update brings the standard types annotated with generic template types; this is especially helpful in Laravel and Symfony frameworks, where it provides type inferring for all the collections, iterables, Generator, DOMNodeList, etc.
This improves value inferred within foreach for all kinds of iterables.
Doc Comment Snippet for Variables
When creating a Doc Block above variable assignment, or above a global variable, you can now configure the snippet that will be created. Additionally, the snippet setting has a new property "singleline": true|false (for variables it's true by default) allowing you to specify whether to create the Doc Block single-lined (i.e. /** @var Type */).
Sample setting:
{
"php.docblock.variableSnippet": {
"singleline": false
}
}
Fixes
integer,boolean,listtypes are handled properly in Doc Block.- Unused
useanalysis fixed, so it handles type names specified in Doc Blocks. - Diagnostic and parameter completion for
session_set_cookie_params()works for both possible definitions. - Missing
Imagickconstants added. - Improves type inferring for generic types and various edge cases.
Stable
1.26.11866
IntelliSense & Enums
The PHP 8.1 enum objects implicitly implements UnitEnum and BackedEnum interfaces. The BackedEnum<TValue> interface is annotated with a template type argument so it can be used in Doc Comments with the backed type for better type analysis. E.g.:
/** @param \BackedEnum<string> $e */
function foo($e) {
return $e->value // -> string
}
enum MyEnum : string {
case A;
}
foo( MyEnum::A );
Generic Types & Doc Comments Type Annotations
The type annotations in PHP Doc Comments have been reimplemented, so even complex constructs are handled, can be completed, refactored, highlighted, and previewed. Highlighting occurences works even in nested generic types, as well as rename refactoring and code completion.
/**
* @template TElement of \BackedEnum<string>
* @return (Collection<int, TElement>|array<int, TElement>)[] Complex generic type annotations */
Multi-Lined Structured Array Types
This release adds support for multi-lined structured array type annotations. This allows users to specify array type with its keys and corresponding entries types. See the exmaple below:
/**
* @return array
* {
* name: string,
* age: int,
* }
*/
Code Diagnostics Improvements
We're constantly working on improving the code analysis and related diagnostics. This release avoids a lot of falsy warnings.
Formatting
We're happy to introduce new Laravel code style. You just need set php.format.codestyle to laravel.
Now you can also let formatter to auto-align consecutive assignments with php.format.rules.alignConsecutiveAssignments option #692.
$a = 1;
$bbb = 2;
$ccccc = 3;
And other formatting rules we've added are:
| Setting | Description |
|---|---|
php.format.rules.spaceBeforeColonInControflowStatements |
Insert a space before colon in control flow blocks. |
php.format.rules.spaceBeforeColonInReturnType |
Insert a space before colon in a return type. |
php.format.rules.spaceWithinCallParens |
Insert a space within method, function and constructor call parentheses. |
php.format.rules.spaceWithinDeclParens |
Insert a space within method, function and constructor declaration parentheses. |
php.format.rules.spaceWithinArrayInitilizersParens |
Insert a space within array initializer parentheses. |
php.format.rules.spaceWithinIfParens |
Insert a space within if statement header parentheses. |
php.format.rules.spaceWithinWhileParens |
Insert a space within while statement header parentheses. |
php.format.rules.spaceWithinForParens |
PInsert a space within for statement header parentheses. |
php.format.rules.spaceWithinForeachParens |
Insert a space within foreach statement header parentheses. |
php.format.rules.spaceWithinSwitchParens |
Insert a space within switch statement header parentheses. |
php.format.rules.spaceWithinCatchParens |
Insert a space within catch statement header parentheses. |
php.format.rules.spaceWithinBrackets |
Insert a space within brackets. |
php.format.rules.spaceWithinBracketsAroundExpression |
Insert a space within brackets around expression. |
php.format.rules.spaceWithinExpressionParens |
Insert a space within parentheses around expression. |
We've also fixed some formatting issues:
readonlyin namespace caused formatter to stop formattingreadonlyandenumin function declaration doesn't add space before paren- PHP 8.2 Disjunctive Normal Form Types are supported now
- Constant uses were double indented in multi-line expressions #748
- We've address some cases when combing html and php code didn't result in neat looking code. Most notably in Wordpress templates.
Fixes
Hot fix for built-in PHP functions type analysis.
Stable
1.26.11753
Type Analysis Improvements
- Expression in the
assert()language construct is used to determine variables type now. (#744) - Certain type annotations are now more precise.
- Implicit closure variables inside arrow functions are now properly initialized. This fixes falsy warnings about uninitialized variables use inside nested arrow functions.
- More Core types have been annotated with template type arguments, allowing for better inferring of types where
@templateand similar are used (#746). - Support for generics has been improved to properly handle doctrine/collections and other templated types using extended
@templatesyntax (#746).
Editor Improvements
readonlyandenumkeywords are not incorrectly reported as a syntax error, when used as a part of namespace or a function declaration.- The language server is allocating significantly less memory during code completion; this improves the overall performance.
Formatting
- In Wordpress code style we are no longer inserting space between parentheses and brackets when empty e.g
foo(), butfoo( 1, 2 ). - Not aligning array initializers key value pairs when they are not on separate line (when
php.format.rules.arrayInitializersAlignKeyValuePairsenabled). - Fixes incorrect outdenting of constants in multiline expressions.
Apple Silicon
Introducing the support for Apple M1 and M2 chips (Apple Silicon). These CPU's with arm64-x64 architecture were not fully supported in previous release and we're happy to provide the language server for those architectures now.
Stable
1.25.11652
PHP 8.2
Built-in IntelliSense has been updated to provide the latest PHP 8.2 classes, functions, constants, and documentation in all the available languages (#215).
As a part of PHP 8.2, we have added integrated multi-language documentation for the new Random extension.
Formatting
One of the feedbacks we got more often was that sometimes formatting was slow. We've addressed these cases, and it should be much better now. But please let us know if you run into a case when it's not fast.
We're also happy to introduce Wordpress code style. You just need set php.format.codestyle to wordpress. Though there are still a couple of rules for us to implement, it's mostly ready.
In this release, we've also focused on code formatting of mixed html/css/js/php. This one is tricky since the indentation of html code is influencing the php code and vice versa #171. We think we got it right now, so hopefully wordpress templates will look good when formatted.
Fixes
- On the first format request, directly after VSCode was first started, only php code was formatted.
- HTML matching tag should get highlighted regardless if it has a php tag inside. #172
- Wrapping of function arguments list with trailing comma, stoped the formatter.
- Incorrect indentation of function calls prefixed with namespace backslash.
- Unwanted spaces inserted into php code in javascript. #222
- When formatting, indentation of php code determined by a position of open tags might have been incorrect. The formatter needed a second pass to get it right.
- Code diagnostics fixes:
parent::not reported as static call in some cases.- Local variables in nested arrow functions not reported as uninitialized.
- Inheriting
@paramtype from base classes, if there is no Doc Comment. - Removed support for old
@paramsyntax #740. - Fixes control flow analysis of nested binary expressions.
- Added support for alternative Doc Comment array syntax, i.e.
(int|string)[]. - Fixed type analysis for more complex generic types inheritance.
- Added support for generic
IteratorAggregate<TValue>. - Generic types are properly propagated and substituted in tool-tips.
Stable
1.25.11537
Hover Tool-Tip Improvements
Newly, the mouse hover tool-tip shows descriptions of parameters. This behavior can be changed using the setting "php.hover.parameters".
The documentation link the muse hover tool-tip can be enabled or disabled using the new setting "php.hover.documentation".
Generics
The template type inferring and substitution has been improved to handle more complex type hierarchies. (#723, #733, #731)
Fixes
-
Generated Doc Comment respects
yieldand correctly annotates function withGeneratortype hint. Additionally, the code diagnostics respect function returningGeneratorand correctly analyzes the return value type. -
'enum'keyword is a little hack in the PHP itself. We have fixed how it is parsed so it respects the PHP 5, 7, 8, and 8.1 onwards conrrectly (#205). -
Autocompletion of parenthesis
()is inserted ust once when generating automatic function override (#730) -
Go to Definition has been fixed.
Formatting
New customization settings
As promised, we are adding more formatting options based on your feedback.
| Setting | Description |
|---|---|
php.format.rules.spaceBeforeParenthesesInArrowFunctions |
Space before parentheses in arrow functions |
php.format.rules.spaceAroundConcatenation |
Space around concatenation . |
php.format.rules.spaceAfterUnaryNot |
Space after unary not ! |
php.format.rules.groupUseWrap |
Defines wrapping behavior of group use |
php.format.rules.groupUseNewLineBeforeFirstDeclaration |
Place a new line before first group use declaration |
foreach
We are compacting foreach statement headers into a one line by default now (as defined in PSR-12).
<?php
foreach ($iterable as $key => $value) {
}
PSR-12
We've slightly improved PSR-12 code style. Now we are automatically wrapping multiline group use declarations as specified in the standard.
<?php
use Vendor\Package\SomeNamespace\{
SubnamespaceOne\ClassA,
SubnamespaceOne\ClassB,
SubnamespaceTwo\ClassY,
ClassZ,
};
Fixes
- When anonymous class implements list was defined on multiple lines, we didn't indent them correctly
- Implements list wrapping settings work for anonymous classes too
Stable
1.24.11420
Array Shapes
The editor treats inline array shapes specified in Doc Comments now. The following syntax is correct, and understood by the PHP editor:
<?php
/**
* @param array{ name: string, id: int, data: \App\Model\User } $a The entity.
*/
function foo($a) { .. }
Array shapes improve your code completion, as it provides code completion for array keys; and inferred types, as it resolves the array items type according to the specified index.
IntelliSense Improvements
Prentheses Completion
Newly, IntelliSense completes parentheses when completing a function. The keyboard cursor is placed in between them. Optionally, the feature can be either disabled, or the complete function signature can be completed as a snippet. This allows jumping between parameters with [tab] key and fill-in the arguments.
The feature is configurable through the setting "php.completion.parameters". By default, it is set to "parentheses" so it completes just the parentheses ().

Xdebug stubs
We have added stubs for Xdebug extension. Go to settings, and add "xdebug" to the "php.stubs" setting:
{ "php.stubs": ["*", "xdebug"] }
This adds Xdebug functions to IntelliSense, code diagnostics, and improves the type inferring analysis.
Deprecation Messages
Whenever a deprecated symbol is used, it is striked out and the corresponding warning is shown. Additionally, in this release, we're adding the deprecation message to the code completion tool-tip.

Note, to mark your function as deprecated, add the @deprecated Doc Comment tag as it is below:
/** @deprecated Do not use this, since version 1.2.3 it is not maintaned anymore! */
function getEntity(array $row) : object { ... }
Customizable Formatter
Many companies have coding guidelines when creating source code which might differ from our predefined code styles. We're happy to introduce highly customizable formatter and we begin with around 30 different code formatting options. This is just a begining and we're accepting suggestions which options to prioritize next.
These more granular code formatting options are only available for PREMIUM users, but Community version users can still influence formatting with php.format.codestyle option.
For example you can let formatter to auto-align key value pairs in array initializers with php.format.rules.arrayInitializersAlignKeyValuePairs option #692.
$x = [
1 => 'foo',
1234 => 'bar'
];
Or if you and your company prefer Whitesmiths style you can set that up by setting php.format.codestyle to allman and php.format.rules.indentBraces to true #689.
function foo()
{
echo "Hello";
}
In general use php.format.rules.* settings to configure the formatter to behave as you wish. For a detailed list of formatting options, either open the Settings Editor (Ctrl+,) and type php format in the Search bar or see our documentation page.
Format on Type
We've reimplemented how format on type behaves. Now it correctly picks up what part of the code you are editing and formats it when you type ; or }. This way your code always stays correctly formatted without a need to explicitly call the formatting command.
We recommend to turn this feature on. By default in VS Code it's disabled.
If you'd like to turn it on just for PHP you can do it in settings.json like this:
"[php]": {
"editor.formatOnType": true
}
Formatting Fixes
- Functions with multiple parameters that also contained
func_get_argsorfunct_num_argsin the body stopped the formatter. - Multiline use traits statement were double indented.
- Indentation fix of lambda functions nested in certain statement headers.
- Fixes indenation of chained method calls when part of the chain is a field. #715
- Correctly indents arguments of static method calls spread across multiple lines.
- Fixes indentation of multiline field uses, including static fields or constants.
- Null-safe operator is supported.
- Attributes are supported.
IntelliSense Fixes
Control Flow
We have fixed the control flow analysis, when there are functions that never return (i.e. they throw an exception instead of returning a value). Correspondingly, false warnings about unreachable code were fixed, and corresponding variables type inferring as well.
Trailing Comma in Lambda use ()
The issue with unsupported trailing comma in lambda declaration has been fixed (#207).
Blade
We have fixed use of @can, @endcan, @forelse, and @empty inside .blade.php files.
"php.stubs"
The configuration setting "php.stubs" has been fixed. It was not working after reloading a workspace.
Stable
1.23.11234
launch.json with "envfile" Option
Newly, you can specify your .env file to be used by the built-in PHP server. This is important especially when developing a Laravel application! An example launch configuration would look like the following:
{
"name": "Start Built-in Server with .env",
"type": "php",
"request": "launch",
"runtimeArgs": ["-S", "localhost:8888", "-t", "public"],
"envfile": ".env"
}
Doc Comment Generator
The generated PHP Doc has been improved. It specifies @var above properties and class constants if possible. Additionally, if the function is recognized as it never returns, it annotates the return type as @return never (#193).
Quick Fixes
The quick fix for getters and setters follows PSR-12 now. Additionally, it specifies a type hint in the correct form.
Quick fix for generating __construct() (#198) generates Doc Comment in the correct form now. Then generated function complies with PSR-12 now as well.
Also the quick fix for implementing an interface has been updated to follow PSR-12 and to generate type names correctly.
PHP 8.2
The remaining PHP 8.2 features are being supported by PHP Editor.
- Newly, the special attribute
#[SensitiveParameter]is included in code completion. - Also,
enumcase values can be used in constant expressions, as specified in RFC.
Formatting
PSR-12
There are couple more rules we are introducing for PSR-12 code style in this version. Particularly they instruct the formatter on how to behave when formatting control statement headers which are spread across multiple lines.
e.g.
for ($i = 0; $i < 10; $i++
) {
// for body
}
gets formatted to:
for (
$i = 0;
$i < 10;
$i++
) {
// for body
}
In a same way when list of implements is split across multiple lines, we put first item on the next line and each interface on a separete line.
Now, when wrapping function or method calls we also consider what kind of arguments are used. When a single argument is split into multiple lines, such as array or lambda function, we do not consider this as a reason to split the argument list. (This behaviour is according to PSR12 specification)
<?php
somefunction($foo, $bar, [
// ...
], $baz);
$app->get('/hello/{name}', function ($name) use ($app) {
return 'Hello ' . $app->escape($name);
});
Format Selection
We've improved how format selection is working, which will also affect when editor.formatOnType and editor.formatOnPaste is enabled.
Fixes
We've also fixed an issue when Javascript formatter was adding spaces into php code #203
and HTML formatter editing contents of php code. This mainly manifestated when editor.formatOnPaste option was enabled.
The next, we've addressed some formatting issues as well:
- Constructor closing
)was sometimes indented incorrectly when statement was multiline. - In certain cases comments were indented incorrectly.
- Method calls on single line shouldn't wrap. #693
- Functions with
func_get_argsorfunct_num_argsin the body stopped the formatter. #691 - Only multi-line comments begining with
*are indented + 1. - Sometimes unnecesary new line was added after array initializer.
- lambdas weren't pushed to the new line when containing element was wrapped
- fix of double indentation when constructor was present in multiline array
- Array with multiple lambdas indentation bug. #702
- Parenthesis expressions weren't indented. #700
- Multi-line use traits statement is properly indented now.
- In certain cases new lines after the optional return type were collapsed. #704
Stable
1.22.11089
PSR-12 Formatting
We are happy to announce an introduction PSR-12 code style. With the previous releases we've mostly covered all the important rules necessary for PSR-12 compilent formatter. There are some minor things we are still going to improve, but we are mostly there. We are also switching the default formatting code style from old PSR-2 and from now on, it's going to be PSR-12.

To be complient we've also added these rules:
- Adding space between exception types in
catch (OtherThrowableType | AnotherThrowableType $e) - Compacting whitespaces in function declaration header so the return type is on the same line as
)parenthesis
Being complient with PSR-12 is important, but how the code looks after the formatting is too. And we are continuing to work on beauty part as well. One case we've done for this release is how array initializers are threated. When there is an new line anywhere in the array then we put all the array items on a new line and indent. #683.

In similar way, we are applying the analogous behaviour for call parameters and function/method declarations, but only in PSR-12 code style.
We've also fixed some minor formatting issues.
Composer Improvements
create-project command has been updated. Now it opens the Open Folder dialog if it's not clear where you'd like to create the new project. At the end, it opens the newly created project in VS Code.
New Code Diagnostics
Newly, invalid declaration of properties inside interfaces is reported. (#174)
Also, the code analysis handles the default Laravel class aliases. This affects IntelliSense and avoids false code warnings.
See the Fixes below for more updates.
Fixes
Code Diagnostics are less strict about type juggling (int -> float type juggle in for loops), and also it handles better array element type inferring (#185).
Then we have fixed code diagnostic of functions, that use variable amount of arguments through func_get_args(). (#677)
Also there were issues when problems and IntelliSense did not get updated after composer packages being removed or updated - we've make changes that avoids that, and everything gets updated seamlessly as it should. (#182)
Stable
1.21.10985
@var above function parameters
Editor handles Documentary blocks right above function parameter definition. If there is a @var with type specification, it is used for the parameter type across IntelliSense, tool-tips, and code diagnostics.
class MyClass {
function __construct(
/** @var T[] */
public readonly $list, // $list is of type T[]
) { }
}
Formatting
How it looks is important. So we continue our effort to make it beautiful:
- Indent level is incresed in multi-line expressions when accessing a property or calling a method #530
- We are indenting code in PHP tags in all the code styles. #173
- In certain cases when HTML was combined with PHP unexpected new lines were added #173
-
PHP Close tags
?>are indented according to the previous<?phpopen tagImprovements
PHPUnit Test View
This update improves resolving of PHPUnit tests in Test View panel. Processing test files is faster, avoiding redundant read and parse from disk. Also, the test view now supports tests from inherited classes (#678).
Stable
1.20.10937
Editor Improvements
Highlighting Control Structures
Highlighting occurrences of control structures and corresponding keywords has been added. Newly the editor highlights control structures such as for, foreach, while, or do, with the corresponding continue, or break, when you navigate the caret on them. Also, all returns are highlighted in the function, and cases with default label.
It also highlights matching pairs of switch/endswitch, if/elseif/endif, try/catch/finally, and others.

Fuzzy Search Symbol in Workspace
Searching through the workspace supports fuzzy queries; i.e. the symbol names are matched against letters in the query. Additionally, searching using upper-case letter is case-sensitive, so you can quickly search for camel-cased notation.

Formatting
We are improving formatting support with more cases.
- The cast operators are separated with a space now. (#175).
- Constructor property promotion is formatted correctly. #176
- Unwanted space was added after
::classin certain cases. #530 elseorelseifis placed on a new line when goes after a statement. #530- When type reference is separated from the
?with one space if it's part of the ternary operator. #530
Diagnostic Improvements
New setting "php.problems.scope": "opened"
Newly you can only diagnose PHP files that are opened in the editor. Note, parse errors will be still reported across the entire workspace.
Set the setting "php.problems.scope": "opened" to see how it works.
Check for too many args
Now we check for use of func_get_args, func_get_arg, or func_num_args so functions with variable number of arguments are detected, and _too_manyargs warning is not reported.
Stable
1.19.10893
New Formatter
We have redesigned and updated the built-in PHP code formatter. It provides several new formatting styles through the setting "php.format.codeStyle".
Allman
The Allman style is named after Eric Allman. This style puts the braces on the next line. This applies to all control statements and declarations.
while ($x == $y)
{
foo();
}
K&R
The K&R style (Kernighan & Ritchie Style) keeps open braces on the same line for control structures, types, functions and methods.
while ($x == $y) {
foo();
}
You can still keep using previously supported code styles:
"PSR-2"style,- Visual Studio-like style called
"PHP Tools", - and
"Off",
The formatter works with HTML/JS/CSS, formats ranges, formats whole documents, and formats on typing - after closing a block of code or a statement.

Formatting Fixes
The following is the list of formatting issues we have fixed and implemented:
- Arrow function formatting fixes.
- Formatting supports nested function calls.
- Fixes of formatting enumerations.
- Fixes of formatting related to
matchexpressions. - Heredoc and Nowdoc expressions are left untouched during formatting.
- Formatting correctly indents grouped
usestatements. - Indent multi-line control statements headers.
- Multi-line expressions inside lambdas are indented.
- Empty blocks with comments are indented.
- Group
usestatements andmatchexpressions respect optional trailing comma. - Space between type and ampersand
type &$xwhen formatting function parameters. - Indenting empty blocks with comments.
- Multi-line expressions inside anonymous types are indented.
- Multi-line function and method calls are correctly indented.
- Parenthesis of function or method headers on a new line are not indented.
- Fix of an incorrect new line after a lambda expression.
- Formatting leaves single-line php blocks.
- Close tag is always separated from the previous token.
- Function named arguments are formatted.
- Anonymous classes have space before
{if kept on the same line as a class header. - Fixed formatting of PHP code in HTML attributes (e.g.
<div style="<?php echo "something" ?>">). The formatter won't add additional white-spaces anymore.
Highlighting To-Do Comments
Newly the editor highlights to-do annotations in your code. This helps to keep track of unfinished work and pending issues.

You can customize the style using the following setting:
"php.highlight-todo.style" : {
"backgroundColor": "#ec0"
}
Or you can turn the feature off completely with the setting "php.highlight-todo.enable": false.
Debugger Code Completion
During debugging, when typing into a Debug Console, names of existing local variables will be suggested. Type $ or the completion shortcut (by default Ctrl+Space), and available local variables will be suggested.

New Diagnostics
The editor checks and reports the following diagnostics:
- Calling instance methods statically. (#641)
- Invalid assignments to type properties. (#647)
- Too many arguments provided to a function call. (#645)
- Allows objects to be used for constants, and handles use of Doc Comment with
@varaboveconst.
New Settings
We have added a new setting "php.problems.excludeGitIgnore" (#169) which simply lets you to ignore code diagnostics in files/folders specified in workspace's .gitignores.
Fixes
- Code action for generating
__construct()respects text editor tabs and spaces setting. - Generating Doc Comment (
/**) respects the indentation. - Generating Doc Comment above function respects customized Doc Comment snippet (
php.docblock.functionSnippetsetting). - Fixes some cases, when IntelliSense was not updated after adding Composer packages.
Stable
1.18.10692
Profiler Support 🔥
PHP code profiling allows you to inspect how much time and how many calls were made to every single function in the code.
Read more (docs.devsense.com) ...
We have added support for Xdebug profiling! Xdebug profile files (cachegrind format) can be opened, viewed, and inspected. The extension also highlights hot paths in your code, according to the profiling results.
Call Times View:

Callers/Callees View
Detailed view of callers and called functions, including times.

Hot Path Decoration
Profiling result file is analyzed, and hot paths are highlighted right in the source code:

Updated code diagnostics
- Variables used inside arrow functions are not reported as uninitialized now (#664).
- Diagnostics
PHP1408andPHP1409are reported with a lower severity now.
Open-VSX
The entire extension is now available on open-vsx.org
Other Improvements
- Auto-imported 'use' is sorted (#666).
- HTML code formatting fixes.
- Fix of constructor property promotion formatting.
Stable
1.17.10641
Introducing What's New
We are getting many useful feature requests and feedbacks, and we're trying hard to add as many improvements as we can. One of them was to inform briefly about the news. With this release, we've started showing What's New window with the major updates.
The window can be opened manually with command "PHP Tools: Release Notes". Automatic opening after each major update can be disabled with the checkbox at the bottom of the window.

Debug
Debugging has a few neat features! More settings for enabling profiling, var_dump() produces nicer and more detailed messages, and Xdebug for PHP is determined when debugging starts.
Debug develop Mode
Since this release, we have enabled develop Xdebug mode. This gives nicer looking and more informative var_dump() outputs.
In case you prefer the normal-looking var_dump() messages, change the "noDevelop" setting in the launch.json profile.
Debug profile Mode
You can enable profile mode now. Set the "profile": true setting in your launch.json profile:
{
"name": "Launch & Profile built-in Server",
"type": "php",
"request": "launch",
"runtimeArgs": ["-S", "localhost:8000", "-t", "."],
"noDebug": true, // <-- do not initiate debugging
"profile": true // <-- enable xdebug.mode "profile"
}
Uncaught Exceptions Filter
Newly, the Debug view provides option to either break or ignore Uncaught Exceptions. This options is located in "Debug and Run" view, at "Breakpoints" panel.
Code Diagnostics
- We have fixed incorrect duplicit key check in case of
enum' case values. (#658) - Fixed return type check when return type hint is
void. - Reporting anonymous functions with unused
usevariable. - Reporting anonymous function'
usevariable is not initialized. - Reporting of empty namespaces.
- Checking that value from a function returning
voidis being used. - Reports accessing a property on
void. - Checks expressions in string interpolation are convertible to
string. - Checks that type of a property is defined.
- The diagnostic for unknown class or unknown function is suppressed if user is opening just a single file, without opening a workspace or folder.
- The diagnostic
0412severity has been changed to error, code1412(unassigned variable use).
Composer
All-in-One Composer integration has been added! It implements useful commands for requiring, removing and browsing packages, automatically installing composer.phar so you don't have to, adding IntelliSense for composer.json, code lenses for running scripts, neat tool-tips for your installed packages, it checks for abandoned packages, and more!
Other Improvements
There are fixes to the PHP formatter. Formatting wasn't performed when explicit cast was used with less common data type alias, e.g. (integer), (boolean), or (real).
Stable
1.15.10535
Command PHP: Search todo ...
Introducing a quick way of browsing through all the to-do comments in PHP code. The command "PHP: Search todo ..." opens quick pick with all the to-do. It allows to filter, search through, and navigate to the selected item.

Tool-Tips get nicer
Hover tips for function signatures are split into more lines if they would get too long. Also, the optional parameters are not denoted with [ ] anymore. (#159)

Additionally, safe HTML tags in code comments get rendered nicely in a tool-tip now. Having tags like <br/>, <b>, <i>, <ul>, <li>, <code> in your documentary comments is allowed and when displayed in a tool-tip, it gets rendered nicely and formatted.

Code Diagnostics
We have added more diagnostics, and fixed a few rare cases in code flow analysis.
- There is a diagnostic for invalid use
break;, whenbreakorcontinueare out of the allowed scope. - Diagnostic of code reachability with
try/finallywas fixed. - Diagnostic of function return has been improved in cases, where there is a type hint
mixed, but the function does not return anything.
Other Improvements
There are fixes to internal exceptions, and several performance and memory use optimizations.
Stable
1.14.10471
- new
"php"task definition; this allows defining VS Code task that executes a PHP script, using currently configured "php" executable:// .vscode/tasks.json { "type": "php", "file": "${workspaceFolder}/script1.php", "args": ["argument"] } - settings
"phpunit.preTask"and"phpunit.postTask"allowing to specify a task or list of tasks fromtasks.jsonto be executed before or after a test runs (#154).- tasks executed within
phpunit.preTaskandphpunit.postTaskcan use variables${command:phpunit.filter}or${command:phpunit.testsuite}
- tasks executed within
- settings to customize DocComments (PHPDoc) generated by typing
/** - Diagnostics:
- duplicit field declaration reported
- duplicit class constant declaration reported
- dynamic properties reported if there isn't corresponding
__get/__set, or@propertyannotation - foreach control variables can be annotated with DocBlock
- IntelliSense: updated PHP 8
Attributeclass declaration with its members - getter/setter code action respects
staticproperties
Stable
1.13.10390
- fixes format on paste
Stable
1.13.10378
- fixes for HTML/CSS/JS editor features
- HTML/CSS/JS formatting enabled in PHP files
- fixes Format breaks subsequent code (#156)
Stable
1.13.10301
- PHP 8.2 read-only classes supported.
- Some PHP 8.2 compatibility checks.
- Go To Definition command navigates to
include/requiretarget file. - Tooltip for pseudo-constants shows correct value.
- Spacebar (pressing
space) afternew,use,extends, orimplementstriggers code completion. - Non-Standard Doc Block type names supported (#622).
Stable
1.13.10239
- code diagnostic for unknown properties (
PHP0416)- quick fix for unknown property (for now fixing small typos and casing)
stdClassand classes with__get()magic method ignored (as specified in the PHP 8.2 RFC)
- auto-import (FQN) avoids creating a conflict name
- code completion after
extendsavoids suggesting the containing class itself - fixes case-sensitivity checks for property names
Stable
1.12.10140
Go to Type Definitioncommand added; navigates to type definition instead of__constructinnewexpression.- PHPUnit View: Fixes tracking a failed test location (#150)
Stable
1.12.10040
- setting
php.workspace.includePathallowing to specify additional directories to be included in IntelliSense. - improves workspace loading, processes files better in parallel
Stable
1.12.10022
- fixes activation
Stable
1.12.9985
- PHPUnit Tests Integration
- new UI for PHPUnit tests
- showing inline failure messages
- debugging PHPUnit tests using the new UI
- diff of expected and actual values
- smaller extension
- avoids dependency to the old
ms-vscode.test-adapter-converter(can be uninstalled) - avoids dependency to the old
hbenl.vscode-test-explorer(can be uninstalled)
- optimized extension load, smaller installation package
- suggesting new parameter name based on its type hint
- union types properly inserted in newly generated Doc Comment (when typing
/**above function) - generated Doc Comment annotates thrown exceptions (
@throwsPHPDoc Tag) - handles external changes, fixes re-indexing when composer packages are being installed/updated
- showing all classes in PHPDoc completion, will be auto-imported when commited (according to setting
php.format.autoimport) - fixes Alpine Linux Arm64 platform
- fixes
phpTools.languagesetting for various texts (summaries of various built-in functions and constats). - fixes unused
usewarning being listed twice - fixes rename refactoring of variables inside Doc Comments.
- not reporting missuse of
$thisin template files - improved completion after functions noted in .phpstorm.meta file.
- improved completion after methods annotated with generic type within trait
php.format.autoimport-docblocksetting to configure completion of type names within Doc Block,"FQN"by default.
Stable
1.11.9762
- fixes completion after
enum's case (no completions listed) - fixes tooltip over variables, resolved type name is correctly shortened
Stable
Stable
1.10.9721
- fixes language server crash when completing the builtin
enummember.
Stable
1.10.9716
- IntelliSense support for builtin
enummethods and properties. - Improves type inferring for array-typed properties.
- Laravel's Real-Time Facades recognized, and supported by code completion.
- Eloquent's Local Scopes listed in code completion.
- Fixes highlighting of unused
usewhen it's used in an unused Doc Comment. - Fixes Test Explorer for tests annotated with
@testDoc Comment.
Stable
1.9.9585
- infers
@templatetypes in combination withclass-string<T>type annotation - automatically recognizes some non-standard file extensions to be parsed as PHP files as well (improves code completion on Drupal)
- fixes completion after reserved type names (
self,parent,static) - fixes
->syntax after constants and class constants (PHP 8.1) - fixes completion after
->withnewin the expression chain - fixes changing PHP version
Stable
1.9.9479
- improves Laravel Facades inferring on multi-core CPUs
- improves documentary comments processing, respects more conventions from phpstan and psalm
- improves code completion on generic types and generic
@mixintypes - fixes possible crash on huge projects (StackOverflow fix)
- fixes possible completion issue, when 3rd party extension passes invalid LSP protocol data
- fixes issue handling breakpoints when there are many concurrent requests
- debugger stability improvements
Stable
1.9.9277
- IntelliSense
- support for generics
- IntelliSense handles specialized type names
- templated types are resolved against bound generic arguments
- generic types are infered from constructor arguments passed to
new() - tooltips shows the generic arguments
- IntelliSense understands
@templatearguments, and extended PHPDoc syntax (generics, psalm, phpstan) - IntelliSense completes special PHPDoc tags used for generics
- code completion uses the template
oftype if the value is unbound - code analysis respects generics
- updated PHP syntax parser, fixes
instanceofsyntax - fixes missing items in IntelliSense after installing/updating composer packages
- fixes for HTML/CSS/JS IntelliSense
- fixes items in IntelliSense after external file changes
- stubs include
zipandzlibby default - providing API for 3rd party extensions
Stable
1.8.8970
- adds missing
MYSQLI_constants - fixes PHPUnit runner; resolves correct
phpunitPHP script - fixes processing HEREDOC and NEWDOC syntax with empty lines and indentation
- fixes parser to allow PHP 8
readonlymodifier in constructor property - fixes
phpTools.languagesetting, PHP manual is localized properly - unused
usecheck respects@MethodPHPDoc tag - fixes freezing during resolving PHP binaries and related PHP information
php.linkedEditing.variables: setting to enable linked editing for local variables (falseby default,editor.linkedEditingneeds to be enabled)editor.linkedEditing: avoids bad edits when the whole variable name is deletededitor.linkedEditing: keeps the linked variable names even after they get deleted- debugger listens on both IPv4 and IPv6, supports optional launch configuration
"hostname" - debugger fixes for arrays
php.versionsetting is respected by the editor even there is no matchingphpexecutablecomposer.jsonis checked for the minimum PHP version, ifphp.versionsetting is not set- web extension shows and allows to change PHP language level
- extension does not download external dependencies; makes the initial run faster and reliable
- extension does not expect
dotnetruntime installed on the system - language server supports incremental text edits to lower protocol overhead
- new platforms supported:
alpine-x64,win32-arm64,darwin-arm64
Stable
1.7.8766
- updates IntelliSense with
ctypebooks - updates IntelliSense with STD constants
- functions marked with
@ignoreare not listed in completion and signature help - completion after
newlists variables as well - optimizations
Stable
1.7.8717
- language server stability fix of a possible issue (when using ORM notation)
"php.debug.port"can be set in workspace scope settings.- debugging tests fix; uses correct port from
"php.debug.port"or9003by default. - Laravel static Facades recognized in IntelliSense
- Laravel class aliases recognized in IntelliSense
- improves code parser with PHPDoc
Stable
1.7.8637
- web extension load fix
Stable
1.7.8627
- debugger reports correctly when one or all of the ports are not available
- fixes missing
E_constants in IntelliSense - PHPUnit debugger respects Xdebug port setting "
php.debug.port" instead of using hardcoded port9000
Stable
1.6.8588
- debugger "exclude" launch setting allows to negate the path with
!prefix, i.e.:"exclude": ["!**/app/**", "!**/vendor/mypackage/**"] - debug won't launch if no Xdebug ports are available
- if Xdebug port can't be used, the detailed message is reported to the debug output panel
- installation: downloading dependencies with alternative locations
- IntelliSense prefers PHPDoc type annotation over the type hint (more specific completions)
- Doctrine ORM attributed annotation used for properties type annotation
- Language Server avoids using File System Watcher improving performance on Unix based system (#521)
- smaller installation package
- setting
"php.stubs"allowing to explicitly set names of extensions to be included in the IntelliSense, localized manual, and code analysis. - added support for linked editing (
"editor.linkedEditing": true) for local variables
- new platform supported:
web
Stable
1.6.8479
- fixed preview of string values
- optimized file parsing
Stable
1.6.8448
- code analysis shows the incorrect declaration of PHP 8.1
readonlyproperty - fixes code-lens in virtual PHP manual files (when navigated to a builtin PHP with Go To Def (
F12)) - virtual PHP manual displayed as a VS Code virtual document (does not create tmp file on disk)
- PHPUnit runner and debugger setting
phpunit.phpunitto specify phpunit binary
Stable
1.6.8324
- debugging adornments
- extended compatibility
- code lens for enum cases
php.debug.portand launch port setting allow to listen on multiple ports.[9003, 9000]by default.
Stable
1.5.8292
- fixes debug tooltips and debug watch
Stable
1.5.8280
- debugging launch improvements, provides every option on how to start debug according to current file or workspace
- provides advanced commands for running and debugging PHP files and projects
- added setting
php.debug.portspecifying the default Xdebug port - the editor complies with PHP 8.1 by default, if not specified otherwise
- code lens minor updates
- fixes false warning about missing "php"
- fixes extension dependencies
- fixes extension activation time
Preview
1.5.8204
- Code Lens
- references, method overrides, trait uses, type implementation, method prototype implementation
- peeks the references in the references window
- setting to enable/disable:
php.codeLens.enabled. By defaulttrue.
- if no
phpis set for the workspace, the editor picks the highest defined inphp.executablessetting - improves completion and tooltips after nullable type-hints
- improves code analysis for
traitwith private abstract functions - improves code analysis for use of
[] - improves code analysis about
issetin global code - improves analysis of the missing implementation of abstract methods
- validation for PHP 8.1 intersection types (check for use of scalars, check for valid types used)
- added missing modifier keywords to completion within function header
- fixes Testing to allow to run all tests (
Run all testsin Testing panel)
Preview
1.4.8059
- detected PHP binaries may have invalid configuration, PHP Tools will report the warning and use the binaries anyways if a user wants so.
- diagnostic reports improper use of
staticin parameter type hints - shortens type names inside PHP 8.1 intersection types in tooltips according to the current namespace
- updated color tooltips with PHP 8.1 syntax
Preview
1.4.8033
- fixed overflow to double problem underline position
- debugger respects user arguments over its forced arguments
- avoids suggesting adding
useif it's already there in some cases (#127) - updated PHP manual
- updated code completion within PHP 8 attributes
- avoids reporting ByRef issues as an error, reports as a warning instead
- folding HEREDOC blocks
- possible fix of resolution of existing
phpon Windows - PHP 8.1 intersection types (parsed, resolved)
note: type inferring and tooltips do not handle intersection types completely yet
Preview
1.4.7597
- updated inferred type analysis of built-in functions
- highlights
casewithinswitch - fixed possible stack overflow exception
Preview
1.4.7534
- fixes crashing when code contains huge nested expressions
- fixes language server protocol
- improves code analysis for
array_pad(),array_fill() - fixes false positive warning for chained use of
[]in LValue - memory optimizations
Preview
1.4.7520
- memory optimizations
- fixes crashing when code contains huge nested expressions
Preview
1.4.7494
- function return value summary displayed in tooltips
- fixes refactoring actions
- fixes code actions
- fixes PHPDoc generator
- optimizes protocol
Preview
1.4.7449
- improves analysis of
$this - improves error reporting of unused variables
- fixes whole document formatting
- fixes formatting of variable-less
catch - fixes an occasional issue when no debug port is specified
- internal performance improvements for JSON protocol
- fixes debugging documents without a workspace (just an opened file without workspace or folder)
- updated PHP manual
- fixes PHP parser -
readonlyis treated as it should according to PHP version
Preview
1.4.7295
- PHP 8.1 syntax, code sense, and checks
- read-only properties
- final class const
- new in initializers
- new callable syntax
- updated PHP manual
- fixes incorrectly reported deprecations
- fixes incorrect parameteres with 'null' type hint
Preview
1.4.7254
- Debug
- allows compound launch
- allows more debug sessions at once
- Xdebug port doesn't have to be specified (the
"port"launch configuration)
Preview
1.4.6982
- when auto-import enabled, completions shows all possible types within possible namespaces
- automatically completes fully-qualified-name when auto-importing and there is a conflict with existing alias
- shows (auto import) in completion, if auto-importing will happen
- completion better lists variables
- optimizations
- when there are multiple types to auto-import, they are all shown in the completion list to choose from
Preview
1.4.6842
- automatic import of alias when completion
- setting
php.format.autoimport- auto-import option: auto imports alias when completing types/function/constants out of namespace scope
- fqn: inserts fully qualified name upon completion
- none: inserts name as it is
- hide: does not show inaccessible symbols in code completion
- fix position of light bulb for code action for fully qualifying name
- strikes out deprecated symbols in code completion
Preview
Preview
1.4.6762
- PHP version picker (see Selecting PHP in docs)
.editorconfigproblems conventions (see Problems in docs)"php.problems.scope"setting (ignoring "vendor" folder by default) (see Problems in docs)- debugging improvements
- exception handling - always break on fatal error, option to choose whether to break on handled errors/exceptions
Preview
1.3.6645
- debugging fixes and improvements
- debugging UX improvements
Preview
1.3.6632
- Test Explorer lists tests without running them
- Test Explorer supports tests with data sets properly
- tests get retired (grayed) if the source is modified
- optimized debug protocol
Preview
1.3.6616
- new Test Explorer (requires
hbenl.vscode-test-explorer) - debugging has been updated with support for multiple request handling, stability enhancements, corectness
- debugging supports detach
- optimizes Xdebug protocol
- PHP 8.1 syntax support,
neverreturn type,enum, octal number notation - completion of static methods after
$this-> #[NoReturn]attribute supported
Preview
1.2.6549
- fixes debug implementation (unexpected debug sessions closing)
- fixes debug breakpoints
- optimizes Xdebug protocol
- fixes HEREDOC parser
- fixes named parameters analysis for special names
- fixes PHP 8 parsing and invalid syntax errors
- optimizations
Preview
1.2.6469
- code action for sort uses (PSR-12)
- reports curly braces as deprecated since PHP 8.0
- support for remote file systems
- type analysis improvements
Preview
1.2.6305
- shows PHP version in status bar without suffix
- hotfix for macOS, downloading runtime package
Preview
1.2.6273
- code action for generating constructors
- code action for getter/setter respect field staticness
- fixes code actions
- faster code completion popup
- faster tooltip display for variables
Preview
1.2.6177
- memory optimizations
- fixes for Node.JS on IA-32 architectures
- fixes
PHP0423for ambigous function declarations - does not list names of anonymous classes in completion
Preview
1.2.6021
- PHPDoc generated for local variables and globals when user types
/**above them - updated PHP manual with more PHP 8 declarations
- pretty-print after
::classandfnfixes - avoided a few falsely reported problems
- fixes type analysis for reserved keywords within PHPDoc
@returntag - more details in tool-tips for built-in type keywords
- DBGp Proxy support fixes for the server downloaded from the Xdebug home page
Preview
1.2.5988
- fixes language server crash (stack overflow exception)
- more tollerant problems validation
- code analysis improvements
Preview
1.2.5973
- code analysis overall improvements, finally blocks fixes, constrained constants not reported
- refactoring and highlight occurence fixes for global constants in a namespace
- improved performance
- (linux, macOs) fixes server not being closed after VSCode shutdown or folder closed
Preview
1.2.5931
- rename refactoring allows to rename dynamic names
- language server crash fix when
__constructcontains trailing comma - updated pcre check
- type analysis improvements, less falsely warnings
- improved analysis of standard functions
- improved analysis of try/catch blocks
- tolerant to mismatching PHPDoc type annotation of properties
- type check looks into subtypes of traits and interfaces, not being so strict
- fixed code actions and quick fixes
Preview
1.2.5887
- rename refactoring with preview
- pretty print of
usegroups - built on .NET 5.0 (having
.NET 5.0 Runtimeavoids additional downloads) - treats subtypes when resolving methods
- handles trait users improving analysis of trait and go to definition for methods in subtypes
- improves code analysis and type analysis
- avoids a lot of falsely warnings
- go to definition of parent of anonymous class fix
Preview
1.2.5843
- files in source controlled folders are ignored when changed (.git, .history, .svn)
- fixes PHP version in status bar - only shown when editing a PHP file
- optimizations
- updated PCRE check
- fixed code completion at the very end of document
Preview
1.2.5783
- respects
@templateannotation in PHPDoc - handles inline
@varannotation - signature help for ambiguous constructors (
new \ReflectionMethod) - PHPDoc array type with union elements annotation (
array<A\B\C>) - PHPDoc allows for nullable type annotation (e.g.
?int) - optimizations
- improves code analysis, avoids some false positives
- improves code flow analysis, isset(), is_resource(), and type inference
- improves analysis for lambda function use variables
- CLI specific constants and variables are allowed and code completed
- updates
.phpstorm.meta.phpparser for type inference - does not respect PHP4-style ctor when using PHP 7.1+
- fixes "Go to Implementation" in case of an anonymous class
- fixes return check of generator functions
- fixes check for
__clone()magic method, can be private - fixes check for array access on
\SplObjectStorage - fixes case and array key duplicity check for non-printable characters
Preview
1.1.5686
- support for
@mixinannotations - support for
@methodannotation with$thisreturn type - handles nullable type annotation in PHPDoc
- fixes resolution of type names in PHPDoc blocks
- fixes some incorrectly reported warnings (mostly an unknown method warning)
- updated pcre check
- can be installed on linux-arm64
- improves type names in tool tips
- code formatting for
matchexpressions - fixes code validation of class declaration
- updated integrated PHP manual
Preview
1.1.5620
- syntax checks respect current PHP version including 8.0.
- more quick fixes for invalid union types
- updated pcre check
- tool-tip type names rendered shorter
Preview
1.1.5595
- named arguments code completion (PHP 8)
- named arguments hover information
- functions annotated with
#[Deprecated]attribute reported in diagnostics - diagnostics for matching or unknown named arguments (PHP 8)
- diagnostics for
iterabletype hint - diagnostics for nullable types
- diagnostics for union types (PHP 8)
nulltype name within unions (PHP 8)- improved
.phpstorm.metadata.phpannotations - support for Xdebug 3.0 and PHP 8.0 debugging
Preview
1.1.5532
- updated PSR-2 code formatting
- warning
PHP0415for use of an undefined constant - warning
PHP0418for use of an undefined method - code fix for
PHP0415if it might be a local variable - doctrine annotations in code completion
- fixes class name completion within PHPDoc
- updated global constants in code completion and analysis
- updated PHP manual translations
Preview
1.0.5403
- analysis of class properties
- fixes type hint for magic methods
- stability fixes
Preview
1.0.5342
- PHP 8 new attribute syntax
#[] - more code suggestions
- improves unused
usediagnostic when used in PHPDoc - improves underlining of problems in opened document when typing
@suppressand@SuppressWarningsPHPDoc tags allowing to ignore specified warnings within class/function- supports more PHPDoc array syntax conventions
- improves analysis of
isset()andnew static()
Preview
1.0.5264
- fix for double-dollar
$$character in code completion of a variable
Preview
1.0.5229
- diagnostic and quick fix for names that can be simplified
- diagnostic for unused parameters in constructors and private functions
- updates of externally modified files (
*.php)
Preview
1.0.5153
@dataProviderPHPDoc attribute; code sense, navigation, completion- implement missing abstracts quickfix respects original
publickeyword - PHP 8.0 null-safe operator supported
- PHP 8.0
matchconstruct supported (must have PHP >=8.0phpExecutable) - fix of
quick fixfor overlapping problems - stability fixes
Preview
1.0.5087
- deduplicated quick fixes
- improved type analysis of expressions enclosed in parenthesis
- unknown type name in PHPDoc gets quick fix
- mouse hover shows whether function returns
nullas well (voidis shown asnulleventually) - go to implementations for methods
- provides quick fix for invalid base classes
- code completion after
namespacekeyword
Preview
1.0.5044
- quick fix for unknown class names in PHPDoc
- quick fix to remove unnecessary
use iterablephpdoc type hint- load status indicator in status bar at left
- current PHP version indicator in status bar (bottom right)
- workspace re-analysed lazily when code is changed (disable with
"php.problems.workspaceAnalysis": false)
Preview
1.0.5029
- "go to implementations" support
SonarSource.sonarlint-vscodenot reported as incompatible- fixes "go to" of interface names after
extendskeyword - deprecations are rendered with a strike through
Preview
1.0.5015
- "find all references" of
__constructincludes class instantiations - "find all references" perf.
- problems analysis improvements
- improved analysis of inline PHPDoc type hints
- some problems related to other problems are not reported
- parser fixes
Preview
1.0.4975
- performance improvements
- problems analysis improvements
- improves workspace loading
- logging of workspace load failures
Preview
1.0.4934
- standalone
@deprecatednot ignored - few performance improvements
- fixes duplicities in reported problems
- some problems caused by other problems not reported
- workspace loading and code editing improvements
Preview
1.0.4908
- less falsely positive warnings
- improved type analysis of
staticand properties - PHP 8.0 (Alpha 1) syntax supported
- New PHP 8.0 compatibility warnings
- fixed implements abstracts for trait members
- improved formatting when using tabs
Preview
1.0.4698
- better placement of
usequick action
Preview
1.0.4666
- fixes for systems without .NET Runtime (3.x or 5.x) installed
Preview
1.0.4654
- improved run of all tests (runs within single process now)
- PHPDoc type hints in
@methodrespect current namespace - locals in arrow function used from parent scope and annotated properly
Preview
1.0.4608
- configuration snippet for
Launch current script in consolefixed - HTML tooltips in PHP script
<triggers HTML completion- PCRE patterns check (within
preg_*functions) - PHPDoc
@methodwith vararg supported - unused
usehighlighting respects custom PHPDoc tags - Test Explorer fixes:
- debugging session closed after test finishes
- test cases can be debugged without additional configuration
- fixes exception upon test run
Preview
1.0.4394
- fixed completion of variables (
$prefix is not duplicated)
Preview
1.0.4277
- code flow analysis improvements for
finallyblocks - makes use of
dotnet3.1 if installed on the system - minor fixes, and updates to stabilty issues
Preview
1.0.4229
Implement abstractscode action & quick fix (interfaces and abstract members)Add getter/settercode action for fields and multiple fields- updates to stability issues
Preview
1.0.4187
- code editor fixes (occuring when format on save, format on paste)
- completion inside PHPDoc
Preview
1.0.4168
- improved listing symbols in document/workspace
- listing properties when searching prefixed with
$ - navigation to trait uses
Preview
1.0.4145
- problems check for not implemented functions
- problems check for traits
- improved tooltips and performance
- updated builtin PHP manual
- debugger reports common issues human friendly
Preview
1.0.4009
{@link}in tooltips shown as hyperlink{@inheritdoc}gets substituted according to PHPDoc specs.- updated blade templating editor (
@section,@yield) and formatting fixes - embedded HTML fixes
- stability fixes, improved internal error logging
- reporting problems improvements
Preview
1.0.3951
- generated PHPDoc respects type hints
- generated PHPDoc treats nullable types correctly
- language server crash fix
- avoids spawning
rg.exewhen runningcomposer install|update(fixes system freezing)
Preview
1.0.3936
- PHAR files in workspace get parsed
- code completion includes declarations from PHAR files
- go to definition supports content in PHAR files
- navigation through entries in PHAR files
- signature help and tooltips for declarations in PHAR files
- minor fixes and improvements
Preview
1.0.3774
- formatting of typed properties
- completion after
useis filtered by class name - obtaining long data from Xdebug
Preview
1.0.3748
- classes/interfaces/traits not available in current namespace or uses are not listed in code completion
- dynamic class aliasing supported in code completion and type analysis (
class_alias()and Joomla registered aliases) - PHP in blade blocks (
.blade.php) (except syntax highlighting) - improved type analysis of arguments passed by reference
- fixed pasting when
Format on Pasteis enabled (HTML was corrupted)
Preview
1.0.3703
- performance optimizations
php.problems.workspaceAnalysissetting to enable/disable workspace-wide problems analysis- array unpack type check
PHP 7.4 support
- PHP 7.4 support (arrow functions, typed properties, spread array,
??=operator, underscores in numbers) - PHP 7.4 features reported when using PHP < 7.4
- PHP 7.4 features analysis, type analysis, problems analysis
- spread array type check
Preview
1.0.3645
- improved project load and background analysis
.phpstorm.meta.php(version 2016.2+) processed- Code completion and analysis of IoC
- fixed formatting for nullable types
- formatting pretty-prints opening bracket
{ - formatting code style defaults to
PSR-2
Preview
1.0.3603
- fixed issue when some warnings disappear and after few secs appear
- improved CPU use when opening/closing documents
- fixed formatting around
?:and:: - improved code analysis evaluation
- less strict analysis of use of uninitialized variables
- completion after
usegets fully qualified names
Preview
1.0.3593
- diagnostics of magic methods
- diagnostics of duplicit function parameters
- improved type analysis of numbers
- launching debugger enhancements
- PSR-2 formatter fixes
Preview
1.0.3574
- improved type analysis of
explode(),microtime(), Oxid framework catchvariable diagnostics and analysis
Preview
1.0.3547
- formatter improvements
- DBGP proxy support
- improved unused variable diagnostic
Preview
1.0.3525
- anonymous functions type analysis
- anonymous functions annotated with PHPDoc
- anonymous functions details in tool tips
- signature help with function return type
- dimmed unused variables
- loading project performance, responsiveness
Preview
1.0.3507
- fixed increasing number of untitled documents upon code format
- type analysis improvements
- inital support for dbgp proxy
Preview
1.0.3483
- updated PHP manual
- validation of value passed to
define() - validation of use of
define()on PHP >= 7.3
Preview
1.0.3471
- support for logpoints
php.format.codeStylecan be set in the workspace scope- code formatting fixes, indentation after opening tag, blocks on a new line
html+phpformatting fix for overlapping ranges error
Preview
1.0.3435
- fix for disabling breakpoints
- optimized debug protocol
Preview
1.0.3428
- updated PHP manual for the latest PHP 7.3 and PHP 7.4 constructs
- updated readme
Preview
1.0.3386
- Disabled warning PHP0424 when passing an object in foreach
- Analysis of use params within lambda function
- Minor code navigation fixes
- Minor code formatting fixes
Preview
1.0.3348
- signature helper fixed, showing the correct parameter
- fixes running the extension when there is no
dotnet - works with
dotnet3.0
Preview
1.0.3241
- PHPDoc generation with parameter names
Preview
1.0.3230
- PHPDoc blocks inserted with placeholders (snippet)
- PHPDoc tags snippets
- PHP compatibility warnings
- fixed not disappearing warnings after file delete
- fixed pretty-print of
die()construct - fixed formatting for function headers and properties
Preview
1.0.3202
- updated PHP manual
- format on type (
;and}) - format profile
Off - formatting not applied when code is syntax invalid
Preview
1.0.3185
- code completion in PHPDoc for PHPDoc keywords (after
@) - code actions for typos in PHPDoc and unknown type names in PHPDoc
Preview
1.0.3174
- code action for adding
use ;when applicable - code action to fully qualify type name when necessary
- generating
PHPDocwhen user types/**(formatOnTypemust be enabled) - selection format
- localized messages - en, de, ja, tz, es
Preview
1.0.3058
- improved code formatting
- few texts localized to german
Preview
1.0.3031
- folding collapses the inner range
- formatting code style setting
php.format.codeStyle - PHPDoc for local variables with multiple
@var/@globaltags - code suggestion to add
$this->if applicable
Preview
1.0.3003
- code suggestion for an unknown class error
- unnecessary
usedirectives are rendered as fade out F10andF11start debugging and stop on entryexcludelaunch configuration - patterns that will be skipped from debugging when stepping- debugger allows setting a variable or property value
- debugger supports long strings
- debugger supports paging for large arrays
- test explorer optimization
- generated files are not included in user's workspace
- test explorer shows only user's tests, only if there is no
phpunit.xmlin root then all tests in recursive dirs are listed
Preview
1.0.2930
- display language setting
phpTools.languagecan be changed without reloading the workspace - changing setting
php.problems.excludeupdates the problems window - a file changed outside the editor gets updated
- stability fixes
Preview
1.0.2915
- debugger allows inspecting stack frames and locals value
- experimental: setting
files.excludeis handled - experimental: setting
php.problems.excludeallows ignoring specified folders and all or specified problem codes - not completing items right after <?
- highlighting references under caret optimization
Preview
1.0.2895
- project problems are updated after the workspace is loaded
- some false warnings are not reported
pathMappingslaunch configuration- fix: closing language server process on Unix systems
- fix: working with large mixed HTML/JS/CSS/PHP code
- signature help for new objects
- memory and perf. optimization
- stability fixes
- project startup optimizations
- code folding for all parenthesis
Preview
1.0.2802
- option to activate license/request trial offline
- option to mute warning about missing PHP
- tests are not loaded and run automatically (either enable
autorunor clickreload/start) - debug watch tooltip provides expandable object properties
- more detailed output log about PHP and Xdebug that will be used for debugging/tests
F5starts debugging of current script even without havinglaunch.jsonconfiguration- does not provide basic completion after
:(but::) - code completion handles ambiguous trait declarations
Preview
1.0.2765
- Symbols in workspace feature.
- Processing all files mapped to
phplanguage. - Code completion improvements.
Preview
1.0.2738
- Test Explorer detects phpunit.xml.dist to get enabled
- code completion handles ambiguous types better
- short open tags
<?allowed if there is no normal open tag<?php - updated readme and documentation
- re-enabled completion after $ (fixes recent update in VSCode)
Preview
1.0.2681
- option to request trial license
- downloading dependencies from CDN
- updated the extension's publisher ID
Preview
1.0.2590
- triggering completion after ->, $, \, ::
- code folding for blocks, comments, PHPDoc and regions
- language server providing
- code completion
- hover
- formatting
- code structure
- signature help
- find all references
- navigation
- go to definition
- refactoring
- highlighting
- code analysis and validation
- debug support
- watch
- debug mouse watch
- breakpoints
- UNC paths
- path mapping
- remote debug, console, built-in server
- workspaces
- UNC paths
- built-in PHP server
- PHPUnit Test Explorer
- Live testing
- Tests debugger
- Tests browser
- Initial version of PHP Tools for VS Code



