Skip to main content

lumide_php 1.1.0 copy "lumide_php: ^1.1.0" to clipboard
lumide_php: ^1.1.0 copied to clipboard

PHP language support and development tools for Lumide IDE

lumide_php #

Lumide Plugin License: MIT

Comprehensive PHP language support and development tooling plugin for Lumide IDE.


Prerequisites #

Before using the PHP plugin, make sure the following tools are installed on your system:

1. PHP Runtime (>= 8.0) — Required #

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
    

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
    

4. Code Formatters & Test Runners — Optional #

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

Features #

🐘 Language Server Protocol (LSP) #

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 Servers adds 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 Integration #

  • Composer: Install — Run composer install in an integrated terminal.
  • Composer: Update — Run composer update.
  • Composer: Dump Autoload — Run optimized classmap generation (composer dump-autoload -o).
  • Composer: Validate — Validate composer.json format and dependencies.
  • Composer: Require Package — Interactively search and install PHP packages.
  • Composer: Run Script... — Interactive quick-pick menu of all custom scripts defined in composer.json.
  • File tree context menu integrations for composer.json.

🌐 Built-in Web Server #

  • PHP: Start Built-in Web Server — Quickly spin up php -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.

🧪 Test Runner (PHPUnit & Pest) #

  • PHP: Run All Tests — Automatically detects and runs Pest or PHPUnit.
  • PHP: Run Current Test File — Run tests specifically for the active open file.

🎨 Linting & Code Formatting #

  • Format Document — Uses Laravel Pint or PHP-CS-Fixer when installed, including unsaved changes. Set php.formatter to lsp to use the language server instead.
  • PHPStan — Shows problems in the editor and Problems panel on save when the project has a phpstan.neon config.
  • Lint on save — Runs php -l when 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.


Configuration #

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.

Getting Started #

  1. Open any workspace containing PHP files (.php) or composer.json in Lumide IDE.
  2. The plugin activates automatically. Use the PHP status bar menu to discover servers, then manage them in LSP & Agents.
1
likes
150
points
75
downloads

Documentation

API reference

Publisher

verified publishersofluffy.io

Weekly Downloads

PHP language support and development tools for Lumide IDE

Homepage
Repository (GitHub)
View/report issues

Topics

#lumide-languages #lumide-plugin

License

MIT (license)

Dependencies

lumide_api, path

More

Packages that depend on lumide_php