A minimal Language Server Protocol (LSP) server for PHP.
- PHP 8.3+
composer require firehed/php-lspThe server communicates via stdio:
./vendor/bin/php-lsp- Completion - Member access (
$this->,$var->), static access (Class::),newexpressions, function calls, variable names - Hover - Type information and docblocks for methods, properties, functions, and classes
- Go to Definition - Jump to method, property, function, and class definitions
- Signature Help - Parameter hints when calling functions and methods
# Install dependencies
composer install
# Generate test fixture autoload
composer dump-autoload --working-dir=tests/Fixtures
# Run tests, static analysis, and linters
composer test
# Run just tests
composer unit
# Run just static analysis
composer phpstan
# Run just linters
composer phpcsSee the docs directory for editor-specific setup guides.
MIT