Comprehensive PHP language support and development tooling plugin for Lumide IDE.
Before using the PHP plugin, make sure the following tools are installed on your system:
The plugin relies on the php CLI binary for syntax linting (php -l), built-in web server (php -S), direct script execution, and test runners.
- macOS (Homebrew):
brew install php
- Ubuntu / Debian:
sudo apt update && sudo apt install php-cli php-mbstring php-xml php-curl - Arch Linux:
sudo pacman -S php
- Windows:
- Download from windows.php.net (Thread Safe or Non-Thread Safe x64 ZIP) and add to
PATH, or install via:
choco install php # or scoop install php - Download from windows.php.net (Thread Safe or Non-Thread Safe x64 ZIP) and add to
For rich IDE features such as code completions, hover documentation, parameter hints, go-to-definition, and workspace diagnostics:
-
Intelephense (Recommended β Fast & Full-featured): Requires Node.js:
npm install -g intelephense
(Alternatively, click Install Intelephense (npm) from the PHP Tools menu inside Lumide).
-
Phpactor (PHP-native Language Server & Refactoring Tool): Requires PHP >= 8.2:
# Install globally with Composer: composer global require phpactor/phpactor # Or install standalone PHAR directly inside Lumide: # Click "Install Phpactor (Standalone PHAR)" in the PHP Tools menu.
-
PHP Language Server (
felixfbecker/php-language-server):composer global require felixfbecker/language-server
Required for dependency management, autoloading, running Composer scripts, and project-local tools:
- macOS:
brew install composer - Linux / Windows: Follow instructions on getcomposer.org/download or:
choco install composer
The plugin automatically discovers and runs tools installed locally in vendor/bin/ (or from global PATH):
| Tool | Category | Installation Command |
|---|---|---|
| Pest | Test Runner | composer require --dev pestphp/pest |
| PHPUnit | Test Runner | composer require --dev phpunit/phpunit |
| Laravel Pint | Code Formatter | composer require --dev laravel/pint |
| PHP-CS-Fixer | Code Formatter | composer require --dev friendsofphp/php-cs-fixer |
| PHPStan | Static Analysis | composer require --dev phpstan/phpstan |
Connects seamlessly with PHP Language Servers for rich IDE features (completions, parameter hints, go-to-definition, hover docs, workspace symbols, diagnostics):
- Intelephense (
intelephense --stdio) β Fast, full-featured default PHP language server. - Phpactor (
phpactor language-server) β Powerful PHP-native language server and refactoring toolkit. - PHP Language Server (
php-language-server) β Pure PHP language server. - Custom Executable β Use your own custom PHP language server binary or path.
- Multiple servers β Registers each discovered server, including a custom executable.
- Discovery β Finds servers on PATH and Phpactor in plugin storage or Composer locations.
PHP: Discover Language Serversadds new servers. - Controls β Start, restart, stop, disable, or enable servers in Lumideβs LSP & Agents panel.
Requires Lumide multi-server and workspace controls. The plugin shows registration status; Lumide shows each serverβs runtime state.
Default order: Intelephense, Phpactor, PHP Language Server, then custom. Set php.lsp.server to choose the first. Lumide combines supported results and uses the first capable server for formatting and rename. Duplicate commands register once.
Install commands add servers without replacing others or clearing disabled choices.
The existing command IDs are retained for keybindings:
| Command ID | Current title | Behavior |
|---|---|---|
php.selectLsp |
PHP: Discover Language Servers | Discovers and registers additional installed servers |
php.restartLsp |
PHP: Language Server Status | Lists registered servers and directs you to Lumideβs lifecycle controls |
Composer: Installβ Runcomposer installin an integrated terminal.Composer: Updateβ Runcomposer update.Composer: Dump Autoloadβ Run optimized classmap generation (composer dump-autoload -o).Composer: Validateβ Validatecomposer.jsonformat and dependencies.Composer: Require Packageβ Interactively search and install PHP packages.Composer: Run Script...β Interactive quick-pick menu of all custom scripts defined incomposer.json.- File tree context menu integrations for
composer.json.
PHP: Start Built-in Web Serverβ Quickly spin upphp -S <host>:<port>without leaving Lumide.PHP: Stop Built-in Web Serverβ Stop the running development server.PHP: Open Server in Browserβ One-click preview in default browser.- Status bar server indicator displaying port and state.
PHP: Run All Testsβ Automatically detects and runs Pest or PHPUnit.PHP: Run Current Test Fileβ Run tests specifically for the active open file.
- Format Document β Uses Laravel Pint or PHP-CS-Fixer when installed, including unsaved changes. Set
php.formattertolspto use the language server instead. - PHPStan β Shows problems in the editor and Problems panel on save when the project has a
phpstan.neonconfig. - Lint on save β Runs
php -lwhen no language server is running. PHP: Lint Active File (php -l)β Check the active file and show errors in the Problems panel.PHP: Format Active Fileβ Format the file on disk with Pint or PHP-CS-Fixer.
Formatting and diagnostics require Lumide 0.23.0 and later.
| Setting | Type | Default | Description |
|---|---|---|---|
php.lsp.server |
string |
"auto" |
First server to register: auto, intelephense, phpactor, php-language-server, or custom; all found servers register |
php.lsp.path |
filePath |
"" |
Custom server executable (launched with --stdio) |
php.executablePath |
filePath |
"" |
Path to php binary |
php.composer.path |
filePath |
"" |
Path to composer binary |
php.devServer.host |
string |
"127.0.0.1" |
Host address for built-in web server |
php.devServer.port |
number |
8000 |
Port for built-in web server |
php.devServer.documentRoot |
string |
"" |
Document root folder (e.g. public or web) |
php.intelephense.licenceKey |
string |
"" |
Optional premium licence key for Intelephense |
php.formatter |
string |
"auto" |
Formatter: auto, pint, php-cs-fixer, or lsp |
php.lint.onSave |
boolean |
true |
Run php -l on open and save when no language server is running |
php.phpstan.enabled |
boolean |
true |
Run PHPStan on save when the project has a config |
Reload the PHP plugin after changing the preferred server, custom path, or licence key. Manage runtime state in LSP & Agents.
- Open any workspace containing PHP files (
.php) orcomposer.jsonin Lumide IDE. - The plugin activates automatically. Use the PHP status bar menu to discover servers, then manage them in LSP & Agents.