t3ide / language-server
Language Server Protocol runtime and infrastructure for PHP
v1.0.0
2026-03-22 17:47 UTC
Requires
- amphp/socket: ^2.3
- psr/http-message: ^2.0
- psr/log: ^3.0
- symfony/uid: ^7.2
- t3ide/language-server-protocol: ^1.0 || dev-main
Requires (Dev)
- amphp/phpunit-util: ^3.0
- ergebnis/composer-normalize: ^2.47
- friendsofphp/php-cs-fixer: 3.86
- headercat/phpstan-extension-ide-helper: ^2.1
- nette/php-generator: ^4.2
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9
This package is not auto-updated.
Last update: 2026-04-20 17:02:09 UTC
README
t3ide/language-server is a PHP library that provides JSON-RPC and Language Server Protocol runtime infrastructure.
It is designed as a reusable foundation for building and operating LSP servers in PHP.
What it provides
- JSON-RPC 2.0 message parsing and serialization
- stdio and socket server integration
- request/notification dispatch pipeline with middleware
- request and event dispatch strategies
- client proxy APIs (
window,workspace, diagnostics, work progress) - cancellation-aware request handling
- server runtime stats helpers
Package layout
lib/JsonRpc/- transport, request/response objects, client/server session handlinglib/Core/Dispatcher/- method/event dispatch strategieslib/Core/Middleware/- request pipeline middlewarelib/Handler/- built-in protocol handlerstests/Integration/- integration tests for pipeline, middleware, dispatcher, and handlers
Requirements
- PHP 8.2+
t3ide/language-server-protocol
Installation
composer require t3ide/language-server
Development
Install dependencies:
composer install
Run tests:
./vendor/bin/phpunit
Run static analysis:
./vendor/bin/phpstan analyse -c phpstan.neon
Run coding standards check:
./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --dry-run --diff
License
MIT. See LICENSE.md.