Why does a fresh install of phpactor using neovim give me the following lsp error?

I’m on Windows using Neovim, and I use Mason to install all my LSPs (in this case phpactor). Below is a snippet of my setup function and the LSP Log error I’m receiving.

I can’t even try to get any further because of the error. As soon as the buffer opens, it exits with an error. I’m trying to see if I can get it to work for php and blade files as a side note. What you see below is all I have done for phpactor and nothing else so far.

lsp.lua

  ["phpactor"] = function()
      lspconfig.phpactor.setup {
          filetypes = { "php", "php_only", "blade" },
          root_dir = vim.fs.root(0, { "composer.json", ".git", "phpactor.json", "phpactor.yml" }),
          cmd = { "phpactor", "language-server" },
          init_options = {
              ["indexer.supported_extensions"] = { "blade" },
              ["language_server_completion.trim_leading_dollar"] = true,
              ["language_server_phpstan.enabled"] = false,
              ["language_server_psalm.enabled"] = false,
          }
      }
  end,

LSP Log

[ERROR][2024-10-27 15:40:28] .../vim/lsp/rpc.lua:770 "rpc" "...\AppData\Local\nvim-data\mason\bin\phpactor.CMD" "stderr" "PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, false given in phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/src/Terminal.php:60nStack trace:n#0 phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/src/Terminal.php(60): trim(false)n#1 phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/src/Terminal.php(31): HumbugBox436\KevinGH\RequirementChecker\Terminal::initDimensions()n#2 phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/src/Printer.php(28): HumbugBox436\KevinGH\RequirementChecker\Terminal->getWidth()n#3 phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/src/Checker.php(17): HumbugBox436\KevinGH\RequirementChecker\Printer->__construct(32, false)n#4 phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/bin/check-requirements.php(22): HumbugBox436\KevinGH\RequirementChecker\Checker::checkRequirements()n#5 C:\Users\thadl\AppData\Local\nvim-data\mason\packages\phpactor\phpactor.phar(13): require('phar://C:/Users...')n#6 {main}n thrown in phar://.../AppData/Local/nvim-data/mason/packages/phpactor/phpactor.phar/.box/src/Terminal.php on line 60n"

When I tried using Intelephense, the LSP works for PHP files but fails on blade files. It recognizes the blade file, attaches but doesn’t provide any LSP functionality. I decided to try phpactor but I’m also stuck there.

I’m a novice with neovim, and I’m doing my best with the configurations so it’s possible I’m missing something obvious or doing something wrong.

I essentially want a working PHP LSP for neovim where it works with both PHP files and within .blade.php files. I managed to get the treesitter parser working for blade which took awhile but now I actually need the LSP to work.

Any advice to help me out would be awesome. I’m not sure where to go from here. 🙂 If you need to see anything I haven’t posted, let me know.