PhpNexus
A Visual Studio Code extension for day-to-day PHP development. It integrates the Phpactor language server for editing and adds helpers for debugging, testing, dependencies, code quality, and static analysis.
Extension ID: forward2k.phpnexus · Publisher: forward2k · Package name: phpnexus
Features
- Phpactor language features — completion, go to definition, hover, references, workspace symbols.
- Phpactor workflow UI — status bar menu + commands to install, restart, inspect status, rebuild index, and dump config.
- Xdebug helpers — generate
.vscode/launch.json templates (CLI/Web/Attach/Built-in Server) and setup instructions.
- PHPUnit + Pest support
- commands to run all tests or current file,
- auto-detect runner (
pest / para / phpunit / .phar),
- custom test command template with placeholders,
- support for multiple
phpunit.xml(.dist) files in workspace.
- VS Code Test Explorer integration
- discovery for PHPUnit methods and Pest
it()/test(),
- run/debug single tests, files, and full suites,
- grouped tree by PHPUnit config/suites,
- JUnit parsing for pass/fail and duration.
- Coverage + profiling from Test Explorer
- Coverage profile with Clover parsing and editor/Test Coverage integration,
- Profile mode with Xdebug cachegrind output + quick reveal/open.
- Remote/container path mappings — map Clover/debugger remote paths to local files via
phpnexus.phpunit.pathMappings.
- Composer menu — install, update, require, dump-autoload, validate, list packages from
composer.lock.
- Lint and format
- lint with
php -l or Mago,
- format with
phpcbf, phpcs, or Mago,
- style presets: PSR-12, PSR-2, PER, Allman, K&R, Laravel, Drupal, WordPress.
- Static analysis
- run PHPStan, Psalm, PHPMD, or Mago on current file or project,
- diagnostics in Problems via
phpnexus-static-analysis,
- dedicated output channel: PhpNexus - Static analysis.
- View/template diagnostics filter (optional) — reduce Phpactor
undefined_variable noise in view paths (phpnexus.views.suppressPhpactorUndefined).
Requirements
- PHP on your
PATH or set phpnexus.phpPath.
- Phpactor for language features (the extension can help install it, or point
phpnexus.phpactor.path at your binary).
- Optional tools based on your workflow: PHPUnit/Pest, Composer, Xdebug, PHP_CodeSniffer, Mago.
- For static analysis, install and configure PHPStan, Psalm, PHPMD, and/or Mago in your project (
vendor/bin/..., phpstan.neon, psalm.xml, phpmd.xml, mago.toml).
Main Commands
PhpNexus: Phpactor Menu
PhpNexus: Configure Xdebug
PhpNexus: Show Xdebug Setup Instructions
PhpNexus: Run PHPUnit Tests
PhpNexus: Run PHPUnit Tests in File
PhpNexus: Reveal last test profiler output
PhpNexus: Lint Document
PhpNexus: Composer Menu
PhpNexus: Template Variables (Phpactor)
PhpNexus: Static analysis - current file
PhpNexus: Static analysis - project
Key Settings
Open Settings and search for phpnexus — paths, Phpactor/Xdebug/PHPUnit toggles, lint/format providers, static analysis (enabled flag, tool choice, binary paths, extra CLI args), and view/template options. The settings UI section title is PhpNexus.
Most-used keys:
phpnexus.phpPath
phpnexus.phpactor.enabled, phpnexus.phpactor.path
phpnexus.xdebug.enabled, phpnexus.xdebug.port, phpnexus.xdebug.ideKey
phpnexus.phpunit.path, phpnexus.phpunit.runner, phpnexus.phpunit.command, phpnexus.phpunit.config
phpnexus.phpunit.coverageCloverFile, phpnexus.phpunit.profileOutputDir, phpnexus.phpunit.pathMappings
phpnexus.phpunit.preTask, phpnexus.phpunit.postTask
phpnexus.format.provider, phpnexus.format.standard
phpnexus.lint.provider
phpnexus.staticAnalysis.enabled, phpnexus.staticAnalysis.tool, phpnexus.staticAnalysis.extraArgs
phpnexus.views.suppressPhpactorUndefined
License
GPL-3.0-only — see LICENSE.
| |