Sunday, 24 Sep 2023

Minor Features

  • "php.inlayHints.insertOnDoubleClick" setting to enable or disable inserting the inlay hint on double-click (#1717).


New PHP 8.3 syntax is supported by the formatter.


  • Fixed vendor folder with recursive symlinks (#1720).
  • False named argument error in case the method accepts variadic arguments (#1722).
  • Fixed possible stackoverflow and language server crash (#1724).


Wednesday, 20 Sep 2023

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.

PHP class name suggestion

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.

file path suggestion


  • Old-style composer/installed.json file supported.
  • Fixes some formatting issues that occurred when mixing PHP with HTML.


Friday, 15 Sep 2023

Setting for Getter/Setter Naming Convention

Added setting for naming convention of generated getters and setters.

set naming convention

PHP 8.3 Syntax

Adding support for PHP 8.3 syntax features including:

  • Typed class constants
  • Anonymous readonly classes
  • Dynamic class constant fetch


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 for true and false constants.
  • php.format.rules.nullConstantCasing: Defines casing for null constants.


  • 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.


Friday, 1 Sep 2023


  • sticky scroll #387
  • tooltip for default case #1692
  • tooltip for attributes
  • fixes type analysis of parameters without type specified
  • fixes problems analysis setting
  • caching of /vendor/ fixes
  • fixes use of static in /vendor/ files #389
  • fixes temporary cache incorrectly created in the workspace X/1697612088196137243


Wednesday, 30 Aug 2023

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.


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!

analyse virtual document

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.

Symbol outline with details


  • Fixes lag when closing VS Code or a Workspace.
  • Fixes use statements sorting.
  • Fixes go-to-def of a method defined in a trait.
  • Fixes @psalm-import-type phpdoc tag support.
  • Fixes inlay hints when there is a new without parameters.
  • Fixes rename refactoring of static methods.
  • Optimizations.
  • Fixes formatting issues that occurs when using reserved words in namespaces, such as default


Friday, 4 Aug 2023

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 namespace label and colored tool tips

Completion Colored Details

The code completions popup is formatted and colorized as well.


  • Class name completion in single-quoted strings has been added.


  • 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


Saturday, 1 Jul 2023

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": [
    "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-type and @phpstan-import-type are supported (#1543).
  • phpstan.neon (and .dist alternatives) in containing directories processed; supporting their global type aliases (phpstan.neon file'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 use with adaptation are analysed correctly giving unseful insights about missing method implementation.
  • Fixes control-flow analysis of certain try/finally blocks.
  • 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 .phar files in the solution has been fixed.


Tuesday, 20 Jun 2023

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.


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.


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.


This update fixes an issue related to the process not being terminated when code gets closed.


Thursday, 15 Jun 2023

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 instanceof keyword.


  • Fixed a few memory leaks!
  • match, fn, and interface are not reported as syntax errors when within a qualified name (PHP 8.0+).
  • PHP 8.2 standalone true, false, and null type names. (#338)
  • Fixed a few type inferring cases.
  • Fixed reporting functions annotated with @ignore tag as unknown.
  • Type hinting through /** @var */ above if fixed.
  • 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


Friday, 5 May 2023


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.


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.openBraceOnNewLineForNamespaces which place open brace { on a new line for namespace declarations.
  • php.format.rules.openBraceOnNewLineForBlocks which place open brace { on a new line for all types of code blocks, except for those controlled by other formatting rules.
  • php.format.rules.spaceBeforeParenthesesInControlStatements which insert a space before parentheses in control statements.
  • php.format.rules.spaceBeforeParenthesesInCalls which insert a space before parentheses in method, function and constructor call parentheses.
  • php.format.rules.spaceBeforeParenthesesInDeclarations which 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).


  • Respecting class_alias() within type checks and type inferrence checks.
  • Respecting @return $this and treating it as static return 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 @method tag (#921).
  • Properly handling the nullable ?static type.
  • 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


Saturday, 8 Apr 2023


Supporting .phpstorm.meta.php with expectedArgments() and argumentsSet() now.



  • 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 static keyword in code completion in function body.
  • IntelliSense/Code analysis handling iterable<K,T> (with 2 generic arguments) the same as PHPStan does (#914).


Wednesday, 5 Apr 2023

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.

multiple phpunit configurations

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.


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 package brianium/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 },


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.


  • Memory leak happening when updating/removing .phar files in the workspace fixed. (happens usually on composer update and require.) #291
  • Not auto-completing parentheses () after array, require/include, exit, and die.
  • 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


Tuesday, 28 Mar 2023


  • null specified as Doc Comment @param type is reported as invalid.
  • true pseudo-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 declare and declare(strict_types=1); after <?php tag.


  • PHPDoc @see and @uses is recognized during rename refactoring, find all references, and highlight occurrences.
  • Unused use check 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.

organize uses


  • Stability fixes.
  • Smart select fixes.
  • #! at the beginning of file not reported as syntax error.
  • Properties on some mixed types not reported as unknown.
  • Format supports indenting PHP8 attributes which are spread over multiple lines #879
  • Format was removing whitespaces when readonly or static was used as function argument name.
  • Fixed the case where formatter was adding an extra space between new and () #883


Monday, 20 Mar 2023


  • 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 @method gets resolved as expected.
  • Fixes rg processes 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


Saturday, 4 Mar 2023

Inlay Hints

Newly Inlay Hints for PHP code are available!

inlay hints

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

inlay hints

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.


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 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 .git and other special directories when changed.
  • Types specified in Doc Comments can be $this keyword as an alias to self, i.e. callable($this) (#843).

Formatting Fixes

  • Fixes formatting when multiple method calls chained when object was inside parenthesis.[#820/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 use with 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 static or self and ( 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.alignConsecutiveAssignments when 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 ) when php.format.rules.keepControlStatementsInOneLine option 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 static keyword 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.


Friday, 10 Feb 2023


  • Code Formatter fixes.
  • Fixes various standard functions missing, and missing ambiguities.
  • Homebrew php recognized on macOS.
  • Fixed formatting of heredoc with interpolated variables #820


Thursday, 9 Feb 2023


Folding use has been added; this allows to collapse the block of use statements (tweet).


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};",


  • Backed enumerations are supported.

  • New setting php.format.rules.keepControlStatementsInOneLine. #810

  • Setting php.format.rules.SpaceBeforeColonInControlflowStatements renamed to php.format.rules.SpaceBeforeColonInControlStatements.

  • Fixed unwanted space in type declaration #271

  • php.format.rules.alignConsecutiveAssignments now aligns only assignment if they directly follow each other. Inserting a new line between assignments will force them to align differently.


  • 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.


Tuesday, 7 Feb 2023

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).


  • Duplicate promoted property reported.
  • Reports modifying read-only properties.
  • Reports use of undefined property if there is __get/__set but also @property doc 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).


  • 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/implements keywords.
  • Fixes "Problems: Exclude Git Ignore" in case there are many .gitignore files in the workspace.
  • Fixes use of @global type defined above function declaration.
  • Fixes generating Doc Comment upon /** above trailing comma (#265)
  • Fixes updating problems and code analysis when using includePath overlapping the workspace path(s).


Sunday, 29 Jan 2023

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.

deprecated classes and interfaces


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".


The local development version of composer.phar is updated automatically every 30 days.


  • Missing pcntl constants added to IntelliSense.
  • Fixed #region/#endregion collapsing.
  • Fixed collapsing in various situations.
  • Fixed update of IntelliSense after composer update.
  • Fixed incorrect integer type 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 switch statement.
  • Fixed missing Exception class in the completion right after throw new.
  • Fixed auto-import when there is a syntax error (#671).
  • Formatter does not remove space after yield format (#248).
  • use with leading / stopped the formatter.
  • Colon block ending with ; separated with whitespaces from colon block closing token stopped the formatter.


Saturday, 21 Jan 2023

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:

simplify conditional expression

Assignments can be simplified

Simplifying assignments:

simplify assignment expression

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.

phpstan conditional return types

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.


  • 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 @mixin members (#777).
  • html files can be associated with php language support.
  • //region///endregion folding (#788)


  • 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
    • Unset calls weren't formatted with spaces within parentheses.
    • exit() or die() do not have a space within parentheses.
  • php.format.rules.alignConsecutiveAssignments stopped 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 case inside switch was followed by ; instead of : stopped the formatter.


Monday, 9 Jan 2023

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.

php callable specification

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


  • integer, boolean, list types are handled properly in Doc Block.
  • Unused use analysis 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 Imagick constants added.
  • Improves type inferring for generic types and various edge cases.


Tuesday, 3 Jan 2023

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.


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:

  • readonly in namespace caused formatter to stop formatting
  • readonly and enum in 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.


Hot fix for built-in PHP functions type analysis.


Wednesday, 28 Dec 2022

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 @template and similar are used (#746).
  • Support for generics has been improved to properly handle doctrine/collections and other templated types using extended @template syntax (#746).

Editor Improvements

  • readonly and enum keywords 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.


  • In Wordpress code style we are no longer inserting space between parentheses and brackets when empty e.g foo(), but foo( 1, 2 ).
  • Not aligning array initializers key value pairs when they are not on separate line (when php.format.rules.arrayInitializersAlignKeyValuePairs enabled).
  • 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.


Wednesday, 21 Dec 2022

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.


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.


  • 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 @param type from base classes, if there is no Doc Comment.
    • Removed support for old @param syntax #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.


Sunday, 11 Dec 2022

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".


The template type inferring and substitution has been improved to handle more complex type hierarchies. (#723, #733, #731)


  • Generated Doc Comment respects yield and correctly annotates function with Generator type hint. Additionally, the code diagnostics respect function returning Generator and 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.


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


We are compacting foreach statement headers into a one line by default now (as defined in PSR-12).

foreach ($iterable as $key => $value) {


We've slightly improved PSR-12 code style. Now we are automatically wrapping multiline group use declarations as specified in the standard.

use Vendor\Package\SomeNamespace\{


  • 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


Thursday, 1 Dec 2022

Array Shapes

The editor treats inline array shapes specified in Doc Comments now. The following syntax is correct, and understood by the PHP editor:


 * @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 ().

php complete 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.

php deprecation message

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_args or funct_num_args in 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).


We have fixed use of @can, @endcan, @forelse, and @empty inside .blade.php files.


The configuration setting "php.stubs" has been fixed. It was not working after reloading a workspace.


Saturday, 10 Nov 2012

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, enum case values can be used in constant expressions, as specified in RFC.



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.


for ($i = 0; $i < 10; $i++
    ) {
    // for body

gets formatted to:

for (
    $i = 0;
    $i < 10;
) {
    // 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)


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.


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_args or funct_num_args in 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


Monday, 31 Oct 2022

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.

PSR-12 code style

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.

Array initializer

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.


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)


Sunday, 23 Oct 2022

@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[]
    ) { }


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 <?php open tag


    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).


Wednesday, 19 Oct 2022

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.

highlight if/elseif/endif

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.

fuzzy search symbols in worksspace


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 ::class in certain cases. #530
  • else or elseif is 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.


Sunday, 16 Oct 2022

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".


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)


The K&R style (Kernighan & Ritchie Style) keeps open braces on the same line for control structures, types, functions and methods.

while ($x == $y) {

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 multi-line expression

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 match expressions.
  • Heredoc and Nowdoc expressions are left untouched during formatting.
  • Formatting correctly indents grouped use statements.
  • Indent multi-line control statements headers.
  • Multi-line expressions inside lambdas are indented.
  • Empty blocks with comments are indented.
  • Group use statements and match expressions respect optional trailing comma.
  • Space between type and ampersand type &$x when 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.

highlight todo

You can customize the style using the following setting:

"" : {
    "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.

debugger code completion

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 @var above const.

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.


  • 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.functionSnippet setting).
  • Fixes some cases, when IntelliSense was not updated after adding Composer packages.


Friday, 30 Sep 2022

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 ( ...

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:

php call times view

Callers/Callees View

Detailed view of callers and called functions, including times.

php callers callees

Hot Path Decoration

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

profiling hot path decoration

Updated code diagnostics

  • Variables used inside arrow functions are not reported as uninitialized now (#664).
  • Diagnostics PHP1408 and PHP1409 are reported with a lower severity now.


The entire extension is now available on

Other Improvements

  • Auto-imported 'use' is sorted (#666).
  • HTML code formatting fixes.
  • Fix of constructor property promotion formatting.


Monday, 26 Sep 2022

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.

release notes command


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 use variable.
  • Reporting anonymous function' use variable is not initialized.
  • Reporting of empty namespaces.
  • Checking that value from a function returning void is 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 0412 severity has been changed to error, code 1412 (unassigned variable use).


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).


Wednesday, 14 Sep 2022

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.

searching to-do in PHP code

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)

long function tool-tip

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.

html tool-tip

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;, when break or continue are out of the allowed scope.
  • Diagnostic of code reachability with try/finally was 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.


Wednesday, 7 Sep 2022
  • 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 from tasks.json to be executed before or after a test runs (#154).
    • tasks executed within phpunit.preTask and phpunit.postTask can use variables ${command:phpunit.filter} or ${command:phpunit.testsuite}
  • 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 @property annotation
    • foreach control variables can be annotated with DocBlock
  • IntelliSense: updated PHP 8 Attribute class declaration with its members
  • getter/setter code action respects static properties


Tuesday, 30 Aug 2022
  • fixes format on paste


Monday, 29 Aug 2022
  • fixes for HTML/CSS/JS editor features
  • HTML/CSS/JS formatting enabled in PHP files
  • fixes Format breaks subsequent code (#156)


Tuesday, 16 Aug 2022
  • PHP 8.2 read-only classes supported.
  • Some PHP 8.2 compatibility checks.
  • Go To Definition command navigates to include/require target file.
  • Tooltip for pseudo-constants shows correct value.
  • Spacebar (pressing space) after new, use, extends, or implements triggers code completion.
  • Non-Standard Doc Block type names supported (#622).


Thursday, 11 Aug 2022
  • code diagnostic for unknown properties (PHP0416)
    • quick fix for unknown property (for now fixing small typos and casing)
    • stdClass and 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 extends avoids suggesting the containing class itself
  • fixes case-sensitivity checks for property names


Thursday, 4 Aug 2022
  • Go to Type Definition command added; navigates to type definition instead of __construct in new expression.
  • PHPUnit View: Fixes tracking a failed test location (#150)


Tuesday, 26 Jul 2022
  • setting php.workspace.includePath allowing to specify additional directories to be included in IntelliSense.
  • improves workspace loading, processes files better in parallel


Monday, 25 Jul 2022
  • fixes activation


Wednesday, 20 Jul 2022
  • 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 (@throws PHPDoc 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.language setting for various texts (summaries of various built-in functions and constats).
  • fixes unused use warning being listed twice
  • fixes rename refactoring of variables inside Doc Comments.
  • not reporting missuse of $this in template files
  • improved completion after functions noted in .phpstorm.meta file.
  • improved completion after methods annotated with generic type within trait
  • php.format.autoimport-docblock setting to configure completion of type names within Doc Block, "FQN" by default.


Friday, 1 Jul 2022
  • fixes completion after enum's case (no completions listed)
  • fixes tooltip over variables, resolved type name is correctly shortened


Wednesday, 29 Jun 2022


Saturday, 25 Jun 2022
  • fixes language server crash when completing the builtin enum member.


Saturday, 25 Jun 2022
  • IntelliSense support for builtin enum methods 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 use when it's used in an unused Doc Comment.
  • Fixes Test Explorer for tests annotated with @test Doc Comment.


Tuesday, 7 Jun 2022
  • infers @template types in combination with class-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 -> with new in the expression chain
  • fixes changing PHP version


Wednesday, 25 May 2022
  • 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 @mixin types
  • 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


Friday, 29 Apr 2022
  • 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 @template arguments, and extended PHPDoc syntax (generics, psalm, phpstan)
    • IntelliSense completes special PHPDoc tags used for generics
    • code completion uses the template of type if the value is unbound
    • code analysis respects generics
  • updated PHP syntax parser, fixes instanceof syntax
  • 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 zip and zlib by default
  • providing API for 3rd party extensions


Wednesday, 23 Mar 2022
  • adds missing MYSQLI_ constants
  • fixes PHPUnit runner; resolves correct phpunit PHP script
  • fixes processing HEREDOC and NEWDOC syntax with empty lines and indentation
  • fixes parser to allow PHP 8 readonly modifier in constructor property
  • fixes phpTools.language setting, PHP manual is localized properly
  • unused use check respects @Method PHPDoc tag
  • fixes freezing during resolving PHP binaries and related PHP information
  • php.linkedEditing.variables: setting to enable linked editing for local variables (false by default, editor.linkedEditing needs to be enabled)
  • editor.linkedEditing: avoids bad edits when the whole variable name is deleted
  • editor.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.version setting is respected by the editor even there is no matching php executable
  • composer.json is checked for the minimum PHP version, if php.version setting 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 dotnet runtime installed on the system
  • language server supports incremental text edits to lower protocol overhead
  • new platforms supported: alpine-x64, win32-arm64, darwin-arm64


Tuesday, 8 Mar 2022
  • updates IntelliSense with ctype books
  • updates IntelliSense with STD constants
  • functions marked with @ignore are not listed in completion and signature help
  • completion after new lists variables as well
  • optimizations


Friday, 4 Mar 2022
  • 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" or 9003 by default.
  • Laravel static Facades recognized in IntelliSense
  • Laravel class aliases recognized in IntelliSense
  • improves code parser with PHPDoc


Saturday, 26 Feb 2022
  • web extension load fix


Friday, 25 Feb 2022
  • 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 port 9000


Saturday, 19 Feb 2022
  • 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


Friday, 11 Feb 2022
  • fixed preview of string values
  • optimized file parsing


Thursday, 10 Feb 2022
  • code analysis shows the incorrect declaration of PHP 8.1 readonly property
  • 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.phpunit to specify phpunit binary


Friday, 28 Jan 2022
  • debugging adornments
  • extended compatibility
  • code lens for enum cases
  • php.debug.port and launch port setting allow to listen on multiple ports. [9003, 9000] by default.


Tuesday, 25 Jan 2022
  • fixes debug tooltips and debug watch


Monday, 24 Jan 2022
  • 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.port specifying 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


Monday, 17 Jan 2022
  • 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 default true.
  • if no php is set for the workspace, the editor picks the highest defined in php.executables setting
  • improves completion and tooltips after nullable type-hints
  • improves code analysis for trait with private abstract functions
  • improves code analysis for use of []
  • improves code analysis about isset in 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 tests in Testing panel)


Monday, 20 Dec 2021
  • 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 static in 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


Friday, 17 Dec 2021
  • fixed overflow to double problem underline position
  • debugger respects user arguments over its forced arguments
  • avoids suggesting adding use if 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 php on Windows
  • PHP 8.1 intersection types (parsed, resolved)

note: type inferring and tooltips do not handle intersection types completely yet


Thursday, 30 Sep 2021
  • updated inferred type analysis of built-in functions
  • highlights case within switch
  • fixed possible stack overflow exception


Tuesday, 21 Sep 2021
  • 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


Sunday, 19 Sep 2021
  • memory optimizations
  • fixes crashing when code contains huge nested expressions


Wednesday, 15 Sep 2021
  • function return value summary displayed in tooltips
  • fixes refactoring actions
  • fixes code actions
  • fixes PHPDoc generator
  • optimizes protocol


Tuesday, 7 Sep 2021
  • 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 - readonly is treated as it should according to PHP version


Tuesday, 17 Aug 2021
  • 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


Sunday, 15 Aug 2021
  • Debug
    • allows compound launch
    • allows more debug sessions at once
    • Xdebug port doesn't have to be specified (the "port" launch configuration)


Thursday, 15 Jul 2021
  • 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


Tuesday, 22 Jun 2021
  • 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


Saturday, 19 Jun 2021
  • updated code analysis and code completion
  • recognizes more undocumented .phpstorm.meta.php constructs (#102)
  • fixes PHPUnit TestCase MockObject type analysis (#102)
  • code action for simplifying fully qualified names (#88)


Monday, 7 Jun 2021
  • PHP version picker (see Selecting PHP in docs)
  • .editorconfig problems 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


Tuesday, 25 May 2021
  • debugging fixes and improvements
  • debugging UX improvements


Friday, 21 May 2021
  • 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


Friday, 21 May 2021
  • 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, never return type, enum, octal number notation
  • completion of static methods after $this->
  • #[NoReturn] attribute supported


Wednesday, 12 May 2021
  • 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


Saturday, 24 Apr 2021
  • code action for sort uses (PSR-12)
  • reports curly braces as deprecated since PHP 8.0
  • support for remote file systems
  • type analysis improvements


Sunday, 4 Apr 2021
  • shows PHP version in status bar without suffix
  • hotfix for macOS, downloading runtime package


Tuesday, 30 Mar 2021
  • 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


Wednesday, 17 Mar 2021
  • memory optimizations
  • fixes for Node.JS on IA-32 architectures
  • fixes PHP0423 for ambigous function declarations
  • does not list names of anonymous classes in completion


Wednesday, 17 Feb 2021
  • PHPDoc generated for local variables and globals when user types /** above them
  • updated PHP manual with more PHP 8 declarations
  • pretty-print after ::class and fn fixes
  • avoided a few falsely reported problems
  • fixes type analysis for reserved keywords within PHPDoc @return tag
  • more details in tool-tips for built-in type keywords
  • DBGp Proxy support fixes for the server downloaded from the Xdebug home page


Wednesday, 10 Feb 2021
  • fixes language server crash (stack overflow exception)
  • more tollerant problems validation
  • code analysis improvements


Monday, 8 Feb 2021
  • 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


Sunday, 31 Jan 2021
  • rename refactoring allows to rename dynamic names
  • language server crash fix when __construct contains 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


Saturday, 23 Jan 2021
  • rename refactoring with preview
  • pretty print of use groups
  • built on .NET 5.0 (having .NET 5.0 Runtime avoids 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


Monday, 18 Jan 2021
  • 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


Monday, 4 Jan 2021
  • respects @template annotation in PHPDoc
  • handles inline @var annotation
  • 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.php parser 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


Wednesday, 23 Dec 2020
  • support for @mixin annotations
  • support for @method annotation with $this return 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 match expressions
  • fixes code validation of class declaration
  • updated integrated PHP manual


Saturday, 12 Dec 2020
  • 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


Friday, 4 Dec 2020
  • 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 iterable type hint
  • diagnostics for nullable types
  • diagnostics for union types (PHP 8)
  • null type name within unions (PHP 8)
  • improved .phpstorm.metadata.php annotations
  • support for Xdebug 3.0 and PHP 8.0 debugging


Saturday, 21 Nov 2020
  • updated PSR-2 code formatting
  • warning PHP0415 for use of an undefined constant
  • warning PHP0418 for use of an undefined method
  • code fix for PHP0415 if 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


Wednesday, 28 Oct 2020
  • analysis of class properties
  • fixes type hint for magic methods
  • stability fixes


Tuesday, 20 Oct 2020
  • PHP 8 new attribute syntax #[]
  • more code suggestions
  • improves unused use diagnostic when used in PHPDoc
  • improves underlining of problems in opened document when typing
  • @suppress and @SuppressWarnings PHPDoc tags allowing to ignore specified warnings within class/function
  • supports more PHPDoc array syntax conventions
  • improves analysis of isset() and new static()


Wednesday, 30 Sep 2020
  • fix for double-dollar $$ character in code completion of a variable


Tuesday, 22 Sep 2020
  • 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)


Friday, 28 Aug 2020
  • @dataProvider PHPDoc attribute; code sense, navigation, completion
  • implement missing abstracts quickfix respects original public keyword
  • PHP 8.0 null-safe operator supported
  • PHP 8.0 match construct supported (must have PHP >=8.0 phpExecutable)
  • fix of quick fix for overlapping problems
  • stability fixes


Monday, 17 Aug 2020
  • 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 null as well (void is shown as null eventually)
  • go to implementations for methods
  • provides quick fix for invalid base classes
  • code completion after namespace keyword


Tuesday, 11 Aug 2020
  • quick fix for unknown class names in PHPDoc
  • quick fix to remove unnecessary use
  • iterable phpdoc 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)


Friday, 7 Aug 2020
  • "go to implementations" support
  • SonarSource.sonarlint-vscode not reported as incompatible
  • fixes "go to" of interface names after extends keyword
  • deprecations are rendered with a strike through


Thursday, 6 Aug 2020
  • "find all references" of __construct includes 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


Wednesday, 29 Jul 2020
  • performance improvements
  • problems analysis improvements
  • improves workspace loading
  • logging of workspace load failures


Sunday, 19 Jul 2020
  • standalone @deprecated not ignored
  • few performance improvements
  • fixes duplicities in reported problems
  • some problems caused by other problems not reported
  • workspace loading and code editing improvements


Monday, 13 Jul 2020
  • less falsely positive warnings
  • improved type analysis of static and 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


Tuesday, 19 May 2020
  • better placement of use quick action


Wednesday, 6 May 2020
  • fixes for systems without .NET Runtime (3.x or 5.x) installed


Tuesday, 5 May 2020
  • improved run of all tests (runs within single process now)
  • PHPDoc type hints in @method respect current namespace
  • locals in arrow function used from parent scope and annotated properly


Friday, 17 Apr 2020
  • configuration snippet for Launch current script in console fixed
  • HTML tooltips in PHP script
  • < triggers HTML completion
  • PCRE patterns check (within preg_* functions)
  • PHPDoc @method with vararg supported
  • unused use highlighting 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


Thursday, 23 Jan 2020
  • fixed completion of variables ($ prefix is not duplicated)


Tuesday, 10 Dec 2019
  • code flow analysis improvements for finally blocks
  • makes use of dotnet 3.1 if installed on the system
  • minor fixes, and updates to stabilty issues


Friday, 22 Nov 2019
  • Implement abstracts code action & quick fix (interfaces and abstract members)
  • Add getter/setter code action for fields and multiple fields
  • updates to stability issues


Sunday, 10 Nov 2019
  • code editor fixes (occuring when format on save, format on paste)
  • completion inside PHPDoc


Monday, 4 Nov 2019
  • improved listing symbols in document/workspace
  • listing properties when searching prefixed with $
  • navigation to trait uses


Thursday, 24 Oct 2019
  • problems check for not implemented functions
  • problems check for traits
  • improved tooltips and performance
  • updated builtin PHP manual
  • debugger reports common issues human friendly


Monday, 23 Sep 2019
  • {@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


Monday, 9 Sep 2019
  • generated PHPDoc respects type hints
  • generated PHPDoc treats nullable types correctly
  • language server crash fix
  • avoids spawning rg.exe when running composer install|update (fixes system freezing)


Thursday, 5 Sep 2019
  • 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


Thursday, 1 Aug 2019
  • formatting of typed properties
  • completion after use is filtered by class name
  • obtaining long data from Xdebug


Wednesday, 24 Jul 2019
  • 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 Paste is enabled (HTML was corrupted)


Wednesday, 17 Jul 2019
  • performance optimizations
  • php.problems.workspaceAnalysis setting 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


Thursday, 11 Jul 2019
  • 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


Monday, 8 Jul 2019
  • 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 use gets fully qualified names


Friday, 5 Jul 2019
  • diagnostics of magic methods
  • diagnostics of duplicit function parameters
  • improved type analysis of numbers
  • launching debugger enhancements
  • PSR-2 formatter fixes


Tuesday, 2 Jul 2019
  • improved type analysis of explode(), microtime(), Oxid framework
  • catch variable diagnostics and analysis


Thursday, 27 Jun 2019
  • formatter improvements
  • DBGP proxy support
  • improved unused variable diagnostic


Monday, 24 Jun 2019
  • 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


Saturday, 22 Jun 2019
  • fixed increasing number of untitled documents upon code format
  • type analysis improvements
  • inital support for dbgp proxy


Monday, 17 Jun 2019
  • updated PHP manual
  • validation of value passed to define()
  • validation of use of define() on PHP >= 7.3


Wednesday, 12 Jun 2019
  • support for logpoints
  • php.format.codeStyle can be set in the workspace scope
  • code formatting fixes, indentation after opening tag, blocks on a new line
  • html+php formatting fix for overlapping ranges error


Tuesday, 28 May 2019
  • fix for disabling breakpoints
  • optimized debug protocol


Monday, 27 May 2019
  • updated PHP manual for the latest PHP 7.3 and PHP 7.4 constructs
  • updated readme


Thursday, 9 May 2019
  • Disabled warning PHP0424 when passing an object in foreach
  • Analysis of use params within lambda function
  • Minor code navigation fixes
  • Minor code formatting fixes


Tuesday, 23 Apr 2019
  • signature helper fixed, showing the correct parameter
  • fixes running the extension when there is no dotnet
  • works with dotnet 3.0


Monday, 4 Mar 2019
  • PHPDoc generation with parameter names


Wednesday, 27 Feb 2019
  • 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


Wednesday, 20 Feb 2019
  • updated PHP manual
  • format on type (; and })
  • format profile Off
  • formatting not applied when code is syntax invalid


Thursday, 14 Feb 2019
  • code completion in PHPDoc for PHPDoc keywords (after @)
  • code actions for typos in PHPDoc and unknown type names in PHPDoc


Tuesday, 12 Feb 2019
  • code action for adding use ; when applicable
  • code action to fully qualify type name when necessary
  • generating PHPDoc when user types /** (formatOnType must be enabled)
  • selection format
  • localized messages - en, de, ja, tz, es


Sunday, 30 Dec 2018
  • improved code formatting
  • few texts localized to german


Monday, 3 Dec 2018
  • folding collapses the inner range
  • formatting code style setting php.format.codeStyle
  • PHPDoc for local variables with multiple @var/@global tags
  • code suggestion to add $this-> if applicable


Monday, 26 Nov 2018
  • code suggestion for an unknown class error
  • unnecessary use directives are rendered as fade out
  • F10 and F11 start debugging and stop on entry
  • exclude launch 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.xml in root then all tests in recursive dirs are listed


Saturday, 3 Nov 2018
  • display language setting phpTools.language can be changed without reloading the workspace
  • changing setting php.problems.exclude updates the problems window
  • a file changed outside the editor gets updated
  • stability fixes


Tuesday, 30 Oct 2018
  • debugger allows inspecting stack frames and locals value
  • experimental: setting files.exclude is handled
  • experimental: setting php.problems.exclude allows ignoring specified folders and all or specified problem codes
  • not completing items right after <?
  • highlighting references under caret optimization


Tuesday, 23 Oct 2018
  • project problems are updated after the workspace is loaded
  • some false warnings are not reported
  • pathMappings launch 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


Thursday, 11 Oct 2018
  • option to activate license/request trial offline
  • option to mute warning about missing PHP
  • tests are not loaded and run automatically (either enable autorun or click reload/start)
  • debug watch tooltip provides expandable object properties
  • more detailed output log about PHP and Xdebug that will be used for debugging/tests
  • F5 starts debugging of current script even without having launch.json configuration
  • does not provide basic completion after : (but ::)
  • code completion handles ambiguous trait declarations


Monday, 8 Oct 2018
  • Symbols in workspace feature.
  • Processing all files mapped to php language.
  • Code completion improvements.


Wednesday, 3 Oct 2018
  • 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)


Thursday, 27 Sep 2018
  • option to request trial license
  • downloading dependencies from CDN
  • updated the extension's publisher ID


Friday, 14 Sep 2018
  • 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