# Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation)

- Thread: https://externals.io/message/129046
- Original archive: https://news-web.php.net/php.internals/129046
- Started by Dan Jessen on 2025-11-01T19:35:31+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #129046 — Dan Jessen — 2025-11-01T19:35:31+00:00

URL: https://externals.io/message/129046#129046

Thanks Marco — I agree that any official LSP should follow the PHP spec
closely and avoid adding new type semantics.

The issue isn’t the lack of servers, but fragmentation. Psalm and Phpactor
differ in scope and design, while Phan’s LSP docs haven’t been updated in
years and its Vim plugin is around seven years old. None are standardized
or maintained alongside PHP itself.

PhpStorm is an excellent IDE, but it’s premium — and the fact it’s the only
consistently recommended option highlights a tooling gap. Developers using
VS Code, Neovim, Emacs, or Sublime Text often get a very different
experience.

The Language Server Protocol exists to solve exactly this: as Tom Djenius
de Vries put it, it turns the M×N problem (M editors × N languages) into
M+N — each only needs one integration point.

A spec-aligned, officially maintained PHP LSP could unify that baseline and
make PHP development more consistent and accessible across editors.

Best,
Dan



> 
>
> > […]
>
> Just reporting on existing language servers that already exist, and go way
> ahead of PHP in terms of supported type declarations.
>
> *
> https://github.com/vimeo/psalm/blob/2b0ff73c8bed091af231a0a80ac109126c92083a/docs/running_psalm/language_server.md
> *
> https://github.com/phpactor/language-server/blob/e4934195cc1857ec3347a488f3357b0f0df2d2bf/README.md
> *
> https://github.com/phan/phan/blob/5c25c548b2fb3755e5a01f320dfd96dcd19d850b/README.md#features
>
> Note that the PHP spec is quite limited on more refined types (like
> `int<1, max>` and such, as an example), so I wouldn't expect an "official"
> LSP to support it.
>
> Marco Pivetta
>
> https://mastodon.social/@ocramius
>
> https://ocramius.github.io/  <https://ocramius.github.io/

---

## #129050 — Ben Ramsey — 2025-11-01T23:35:16+00:00

URL: https://externals.io/message/129046#129050 · In reply to: #129046

> 
> 
> ﻿
> Thanks Marco — I agree that any official LSP should follow the PHP spec closely and avoid adding new type semantics.
> 
> The issue isn’t the lack of servers, but fragmentation. Psalm and Phpactor differ in scope and design, while Phan’s LSP docs haven’t been updated in years and its Vim plugin is around seven years old. None are standardized or maintained alongside PHP itself.
> 
> PhpStorm is an excellent IDE, but it’s premium — and the fact it’s the only consistently recommended option highlights a tooling gap. Developers using VS Code, Neovim, Emacs, or Sublime Text often get a very different experience.
> 
> The Language Server Protocol exists to solve exactly this: as Tom Djenius de Vries put it, it turns the M×N problem (M editors × N languages) into M+N — each only needs one integration point.
> 
> A spec-aligned, officially maintained PHP LSP could unify that baseline and make PHP development more consistent and accessible across editors.

IMO, this is something that would work best as a working group involving the maintainers of PHPStan, Psalm, PHP CodeSniffer, PhpStorm, and the related VS Code extensions, since all of these projects have an interest in a spec-aligned PHP LSP. Perhaps PHP-FIG could be a good host for this working group?

Cheers,
Ben
