Re: Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation)
| From: | Edmond Dantes | Date: | Fri, 31 Oct 2025 16:38:45 +0000 |
| Subject: | Re: Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129031@lists.php.net to get a copy of this message | ||
Hello.
Great idea.
> The PHP runtime already provides components that could serve as a foundation — e.g. php -l
> for syntax checking, reflection APIs, AST via php-ast, and insights from static analysis tools
> like Psalm or PHPStan.
At the moment, PHP has several static analyzers.
But what would be really great is the ability to extend and combine
them — for example, having a separate module that determines the data
type of a variable. That component would be invaluable and could be
reused for various purposes, not just within LSP.
In JavaScript, the equivalent of such a “ring of power” was the Babel
project, which allowed manipulating the AST and writing custom
plugins. I think PHP could benefit greatly if such a tool were built
as a standard for AST analysis, allowing small plugins to be created
for it with minimal effort.
---
Ed