Phpactor 2022.12.12

Last modified 2023/01/21 15:25

The Phpactor logo

I have tagged Phpactor 2022.12.12.

This is the 4th monthly Phpactor release, I forgot (or rather conveniently forgot) to write a blog post for the previous release 2022.11.12 so I’ll include the best changes from that too in this update.

The most significant change with this “tag” is that we no longer support PHP 7.4. If this causes you issues please add a comment on this ticket.


Replace Qualifier with Import (2022.11.12)

This another contribution from @mamazu. This refactoring will allow you (in LSP) to replace a fully qualified name with an import. For example invoking code actions on new \Foobar\Barfoo\Bazboo will give you an option to import use Foobar\Barfoo\Bazboo and have new Bazboo.

Symfony Extension (2022.11.12)

The new built-in Symfony extension will facilitate any kind of integration with the Symfony framework, for now it is providing completion for the container:

Symfony Extension

It is able to infer the types from the container and provide completion on the service within the container when it’s used as a service locator.

Prophecy Extension (2022.11.12)

Another advance in Phpactor’s internals has enabled the Prophecy extension:

Prophecy Extension

Generate Mutator

This is code action was introduced by @florian-merle and allows you to generate “mutators” (a.k.a. setters) in the same way that you can currently generate accessors (a.k.a. getters).

Fixes and Improvements


Bug fixes:

  • Fix member template params when declared in interface #1914
  • Do not prompt to generate constructor when object is given no arguments #1911


  • Add properties after constants #1917 @mamazu
  • Remove dependency on webmozart/path-util @mamazu
  • “invokable” type refactoring
  • Do not register services for disabled extensions



  • Fix inference of array subscript expressions #1961

Bug fixes:

  • Prevent race condition that makes old changes get analyzed after new changes #1974
  • Constant visibility not taken into account for completion #1979 @przepompownia
  • Fix crash on rename interface #1982 @nataneb32
  • Fix crash on enum with custom methods #1966
  • Log errors even if they are for a request @lumnn
  • Do not include results key in JSON response when error @lumnn
  • Do not send workDoneProgress notifications to clients that do not support it #1951
  • Fix highlighting on PHP 8.1 #1960
  • Do not crash when encountering an array union operator #1971 @wouterj
  • Fixing handling of HEREDOC in StringResolver #1977 @mamazu


Most of the contributions in the past month have been from external contributors, which is great! I have personally been turning my eye to another side project which has taken much of the time and energy I would otherwise use for Phpactor (and due to which I am able to tell you that I have spent “just” 15 hours on Phpactor since it’s inception). But I’m hoping to get back into it in the new year 😼