xphp-lang / language-server
Language Server Protocol implementation for xphp. Powers diagnostics, hover, go-to-definition and completion in VS Code (and any LSP-aware editor) by reusing the xphp parser AST + Registry directly.
Requires
- php: ^8.4.0
- jetbrains/phpstorm-stubs: ^2026.1
- phpactor/language-server: ^6.0
- phpactor/language-server-protocol: ^3.5
- phpactor/worse-reflection: ^0.6.0
- xphp-lang/xphp: ^0.1.0
Requires (Dev)
- phpunit/phpunit: ^13.0
This package is auto-updated.
Last update: 2026-06-02 05:27:39 UTC
README
Language Server Protocol [partial] implementation that powers editor
intelligence for xphp files across any LSP-capable editor:
- diagnostics
- navigation
- refactoring
- completion
- code lenses
The server can be shipped as a self-contained PHAR that can be used by other tools, like IDE plugins.
The server reuses the parent xphp package's AST, generic-instantiation
Registry, and TypeHierarchy directly -- no second parser, no duplicated
language semantics.
For the public-facing feature inventory plus what's planned next, see roadmap.
Install
composer require xphp-lang/language-server
Build
make build/phar # → var/xphp-lsp.phar
The PHAR is the distribution format for editor integrations bundle -- zero-config install for editors that can't reasonably depend on a Composer-managed working tree.
Overview
---
config:
layout: tidy-tree
---
mindmap
root((LSP))
Navigate
definition
typeDefinition
references
implementation
callHierarchy
typeHierarchy
documentSymbol
workspaceSymbol
documentHighlight
Edit
rename
willRenameFiles
codeAction
codeLens
Understand
hover
signatureHelp
inlayHint
foldingRange
semanticTokens
Validate
parse
bound
duplicate-template
undefined-bareword
constructor-arg-mismatch
Find
completion
completionItem/resolve
Performance
AST cache
stub cache
tolerant-parse
UTF-16 columns
short-name tie-break
lint mode
Loading