Skip to content

Releases: bmewburn/vscode-intelephense

1.11.5 Pre-Release

07 Jul 03:38
Compare
Choose a tag to compare
1.11.5 Pre-Release Pre-release
Pre-release

[1.11.5 - 2024-07-07]

Fixed

  • Various control flow analysis issues.
  • Performance and type inference issues with array read/writes.
  • Type inference following yield expression.
  • False type error when unpacking templated type.

1.11.4 Pre-Release

04 Jul 03:15
Compare
Choose a tag to compare
1.11.4 Pre-Release Pre-release
Pre-release

[1.11.4 - 2024-07-04]

Fixed

  • Invalid Argument Error e.toLspSymbolKind lib/intelephense.js:2:3058335

[1.11.3 - 2024-07-04]

Fixed

  • Laravel eloquent builder queries losing model type.
  • Template mapping between class with a base class method.
  • Cannot read properties of undefined (reading 'length') when encountering attributed property declared with var.

1.11.2 Pre-Release

03 Jul 09:30
Compare
Choose a tag to compare
1.11.2 Pre-Release Pre-release
Pre-release

[1.11.2 - 2024-07-03] Pre-Release

Fixed

  • Type inference for properties with default initialisers.
  • Performance degradation in code with many array read and writes.
  • False undefined variable after while loop with condition expression that resolves to true literal type.
  • Stack overflow when applying large text edits.

1.11.1 Pre-Release

02 Jul 03:55
Compare
Choose a tag to compare
1.11.1 Pre-Release Pre-release
Pre-release

[1.11.1 - 2024-07-02]

Changed

  • When a trait has an annotated or abstract method and the real method definition is supplied by a base class, then go to definition will now go to the base class definition instead of the trait method declaration.
  • Go to implementations now includes implementations provided by a trait where a class both uses the trait and implements the interface.

Fixed

  • False diagnostic when type class-string passed to string constraint.
  • Setting completion.suggestObjectOperatorStaticMethods should be intelephense.completion.suggestObjectOperatorStaticMethods.
  • Crash when parsing incomplete phpdoc type with template type args.
  • Crash when encountering trigger_error call with E_USER_ERROR as argument.
  • Conditional return types with default parameter argument.

1.11.0 Pre-release

29 Jun 07:45
Compare
Choose a tag to compare
1.11.0 Pre-release Pre-release
Pre-release

Added

  • Type Hierarchy. Premium
  • Support for key-of<Type> utility type.
  • Support for T[K] index access utility types.
  • Completion suggestions for $_SERVER array keys.
  • unset() now set variable type to unset.
  • Phpdoc unsealed array shape syntax - array{foo: 'bar', ...<int, object>}.
  • Support PHP 8.3 enum and class constant dynamic access syntax.
  • Ability to turn formatter off/on with comments. Within PHP - // @formatter:off, // @formatter:on. Within HTML - <!-- @formatter:off -->. Within js/CSS - /* @formatter:off */.
  • New setting to prefer @psalm-, @phpstan- prefixed annotations when determining symbol type. Defaults to false. intelephense.compatibility.preferPsalmPhpstanPrefixedAnnotations.
  • Support for @psalm-type and @psalm-import-type type aliases. Set intelephense.compatibility.preferPsalmPhpstanPrefixedAnnotations to true to enable.
  • Support @see, @uses, @link annotations and inline variants.
  • Static member access completion/hover/references when scope is variable of type class-string<Foo>.
  • Hover on array shape string keys.
  • New intelephense.diagnostics.relaxedTypeCheck setting. Defaults to true (previous version behaviour). This setting makes type checking less thorough by allowing contravariant (wider) types to also satisfy a type constraint. This is useful for projects that may have incomplete or innacurate typings. Set to false for more thorough type checks. When this setting is true, the noMixedTypeCheck setting is ignored.
  • New intelephense.diagnostics.noMixedTypeCheck setting. Defaults to true (previous version behaviour). This setting turns off type checking for the mixed type. This is useful for projects that may have incomplete or innacurate typings. Set to false to make type checking more thorough by not allowing mixed to satisy any type constraint. This setting has no effect when relaxedTypeCheck is true.
  • New completion.suggestObjectOperatorStaticMethods setting. PHP permits the calling of static methods using the object operator eg $obj->myStaticMethod();. If you would prefer not to have static methods suggested in this context then set this value to false. Defaults to true.
  • Parameter types are now injected into inline closure arguments to functions from the corresponding parameter annotated callable type. For example declaring function doCallback($myCallback) {} with annotation /** @param \Closure(Foo $param): void $myCallback **/ will result in type hints for $param inside doCallback(function ($param) { /* $param type is known */ });
  • Support @var annotated type above define constants.

Changed

  • Minimum VSCode version 1.82.
  • Recommended nodejs version 20.
  • Literal types and array shapes are now used for constants. eg the type of const FOO = 'bar'; is now 'bar' instead of string, const ARR = ['foo' => true] is now array{foo: true} instead of array.
  • $argv is now type string[].
  • $http_response_header is now type array|unset.
  • $php_errmsg is now type string|unset.
  • Updated stubs.
  • Formatter now aims to be PER compliant. As such, psr12 setting in intelephense.format.braces has been removed and per added.
  • Formatter now allows a single space or no space in unary logical negation.
  • Empty class, trait, interface, enum, function, method bodies are formatted to {} with a single space preceeding {.
  • Short anonymous functions are now formatted to have no space between fn and (.
  • Improved multiline foreach expression formatting.
  • Formatter now allows a single space or no space before colon in alternate control statements.
  • Formatter now allows a single space or newline + indent before opening brace in anonymous class.
  • Formatter now allows semicolon to be placed on a separate line in multiline chained expression statements.
  • Multiline arrays are now formatted to a single element per line.
  • Formatter will preserve wrapped attibutes in HTML.
  • When multiple method/function candidates are found for a call expression, the result will be a union of the return types of the functions/methods.

Fixed

  • Template type resolution from args when arg is subtype of param type.
  • Various control flow fixes and improvements.
  • Missing or poorly displayed code blocks in hover/completion documentation for some built-in symbols.
  • Array destructure with skipped elements.
  • Shorthand ternary type inference.
  • Incorrect import folding range.
  • Param with optional array shape element not indicating element is optional when hovering.
  • Hover on named arg of closure showing incorrect type unset.
  • Incorrect type inferred for dynamic object creation expression when dynamic type is union.
  • Hover showing non php fenced codeblocks incorrectly.
  • Stack overflow with deeply nested string concatenation (TYPO3 PackageArtifact.php).
  • Incorrect return type for symbols with metadata and null default parameter value (Laravel app());
  • Incorrect type when generating phpdoc for variadic params.
  • Declare statement should accept comma separated directive list.
  • Incorrect $matches type after preg_match_all call.
  • Promoted property highlight.
  • Code actions not showing when narrow or zero length range provided.
  • Unable to @disregard errors in method header.
  • Unnecessary match expr format when operand of binary expr.
  • Incorrect file rename if composer.json contains autoload paths without trailing /.
  • static::class resolving to parent class name rather than child class name.
  • Trait method self return type not resolving to consuming class when used as implementation for interface method.
  • Don't show iterable as interface.
  • Variables typed as iterable<Foo> not working with array access notation.
  • Array destructure with ArrayAccess.

1.10.4

26 Mar 01:44
Compare
Choose a tag to compare
v1.10.4

1.10.4

1.10.3

25 Mar 01:08
Compare
Choose a tag to compare
v1.10.3

1.10.3

1.10.2

10 Dec 10:31
Compare
Choose a tag to compare
v1.10.2

1.10.2

1.10.1

12 Nov 23:14
Compare
Choose a tag to compare
v1.10.1

1.10.1

1.10.0

05 Nov 05:26
Compare
Choose a tag to compare
v1.10.0

1.10.0