Phpactor v2022.09.11 Release Notes

  • ๐Ÿ› Bug fixes:

    • [wr] Inconsistent type resolution - removed node level cache #1673
    • [in] Fix exception when indexed file has no path #1643
    • [wr] Do not complete constants on class instance #1614
    • [wr] Include virtual properties in class members #1623
    • [wr] Fix false positive for virutal method not existing #1603
    • [wr] Ignore exceptions (permission denied f.e.) when traversing files #1569
    • [wr] Fix resolutin of virtual method
    • [ct] Fix missing properties refactor does not import class #1534
    • [ct] Fix false diagnostic for missing method #1500
    • [dl] Fix docblock definition location at class level docblocks
    • [idx] Do not try and use non-tokens for property names #1317
    • [cb] Fix rendering of array values in generated code
    • [wr] Fix arrow function completion #1303
    • [dl] Fixed off-by-one error with plain text goto definition
    • [fw] Ensure inotify is stopped before shutting down
    • [wr] properly deconstruct array in foreach
    • [lsp] import unresolved classes refactoring: Ensure only unique names are shown when asking user to select an import candidate
    • [lsp] ensure fully qualified filename is used for generate method refactoring #1313
    • [wr] detect branch determination with throw expression
    • [cr] add missing properties: correctly infer type from call expressions
    • [filesystem] Fix "too many files open" issue #1376
    • [class-mover] Fix long standing bug with aliased imports being duplicated on class move and other strange issues.
    • [lsp] Fix call to properties() on non-class in generate accessors provider.
    • [lsp] Fix unresolvable classes not being listed in code actions
    • [cb] Do not apply HTML escaping when rendering code templates
    • [wr] Promoted property docblock types not picked up #1334
    • [completion] Limit results from the search index (improve search performance significantly)

    ๐Ÿ‘Œ Improvements:

    • [cmp] Show partial namespace to disambiguate class name suggestions
    • [wr] Markdown formatted member completion documentation
    • [ls] publish diagnostics on open and update
    • [ct] Add missing properties for array assignments #1640
    • [cmp] Provide variables from parent frame for anonymous use #1602
    • [ref] Increase reference finder timeout to 1 minute by default #1579
    • [cmp] Improved contextual completion
    • [rn] Fixed numerous issues
    • [rename] Fixed numerous issues
    • [compl] Allow named param completion on functions
    • [wr] Infer return type for generators
    • [lsp] Show Phpactor version info in initialize result @lalanikarim
    • [ls] Fixed class completion performance
    • [ct] Add option to disable importing global functions
    • [cmp] (Better) support for completing imported names #1490
    • [wr] reset,array_shift and array_pop stubs
    • [wr] improved ternary support
    • [log] Include a channel prefxi in log messages
    • [wr] require ext-pnctl (language server would crash otherwise)
    • [wr] handle static properly #967
    • [ls] include list of diagnostic providers in status report
    • [ct] add retutn type to generated method if it would immediately return
    • [wr] support array [] addition operator
    • [wr] support in_array type assertion
    • [wr] support for casts
    • [wr] if statement branches
    • [wr] inline type inference
    • [wr] infer param types from function docblock
    • [wr] support for Closure as a type #1413
    • [wr] expressions are evaluated as types
    • [wr] literal types and internal refactorings
    • [ls] Show error message in client if service stops unexpectedly with an error
    • [code-transform] Faithfully reproduce documented types in generated code
    • [docblock] New docblock parser to facilitate parsing complex types
    • [hover] Improve "offset" hover (mostly related to showing variable info)
    • [templates] Include templates for creating new interfaces, traits and enums
    • [wr] Resolve type from array access
    • [cb] Preserve ? operator as distinct from a union type
    • [wr] Support for class-string type (not for type inference however)
    • [completion + location] Better support for union types
    • [cs] Updated CS and converted property docblock types to actual types

    ๐Ÿ”‹ Features:

    • [-] Better constant suppoer - indexing, goto def, find references, hover, etc.
    • [cmp] Support absolute name completions
    • [ls] Lazily resolve documentation for completion items
    • [ct] Generate constructor refactoring
    • [ct] Fill object refactoring
    • [ct] Remove unused imports diagnositcs and code transformation #1758
    • [wr] Added native WR single-pass diagnostics #1700
    • [cmd] Index clean command #1691 @mamazu
    • [cmp] (re?)support completion on parent:: #1643
    • [cb] Render types based on PHP version #1655
    • [wr] Support @property-read
    • [wr] Support for mixins #990
    • [rf] Support for constants, properties and promoted properties
    • [compl] Docblock completion
    • [wr] Support for intersection types
    • [rf] Union type support for goto definition
    • [ct] Add missing PHP return types
    • [wr] Support for inference for array_map, and arrow and anonymous functions
    • [ct] Add missing @return type docblocks code transformation
    • [cmp] Explicitly enable/disable completors and disable keyword completor by default.
    • [wr] Support iterator_to_array
    • [wr] Handle constant glob to union types (@return Foo::BAR_*).
    • [lsp] show class category in offset hover info
    • [lsp] jump to types in a union type
    • [wr] Type combination
    • [wr] Support for type assertions via. is_*, instanceof etc
    • [wr] Array shape type support (types and completion)
    • [wr] Support for variadics
    • [lsp] Send rename file request to client when renaming a PSR class @przepompownia
    • [wr] Initial support for generics #1382
    • [lsp] Added generate accessors code action
    • [lsp] Added extract constant code action
    • [extension] Removed the extension manager.
    • [extension] PHPStan and Psalm extensions are now included by default.
    • [lsp] Code action to complete constructor with public properties
    • [php] Bump min. PHP version to 7.4
    • [php] Fix PHP 8.1 deprecations
    • [config] JSON schema support
    • [cli] phpactor config:init command to create or update config (to include JSON schema location)
    • [completion] Enum support (requires 8.1 PHP runtime)
    • [reference-finder] Enum support (requires 8.1 PHP runtime)
    • [php8.1] Disable deprecation warnings unless PHPACTOR_DEPRECATIONS provided.