Open-source PHP language support for VS Code. A TypeScript client talks to a bundled Go language server that runs go-php-parser for parsing, indexing, and diagnostics.
Not a complete Intelephense/PhpStorm stand-in. Unimplemented LSP features (formatting, rename, folding, code actions, code lens, inlay hints, document links, type hierarchy, implementations, references, highlights, and similar) are not advertised until implemented.
- Workspace indexing of PHP files, with bundled extension stubs and Composer PHP-version detection (
auto→composer.json, else 8.3) - Diagnostics from the parser analyser (syntax, undefined symbols/variables, class model, invalid calls, language, types, visibility, throws, deprecated, unreachable, empty statements, assignment-in-condition; optional side-effects and style). Toggle families under
phpstrom.diagnostics.analysis.* - Hover (inferred type + PHPDoc when indexed)
- Go to definition and declaration, including typed
->/::members - Go to type definition
- Signature help for calls and
new - Completion from the symbol index plus PHP keywords
- Document outline and workspace symbol search
- Problems view (list/tree, path/regex/error filters) and status for indexing/analysis
- Commands: restart server, clear cache, re-index, refresh problems scan
Marketplace publisher: AOSSoftware. Or build a VSIX locally:
make install # Go server + extension, package, install into VS Code
# or
make package # VSIX onlyNeeds Go 1.23+, Node.js, and the code CLI on PATH for make install.
Move the entries under Unreleased in CHANGELOG.md into the new version, then bump and validate the extension with make release. After the version commit is on main, run the Publish extension GitHub Actions workflow. It packages one VSIX and publishes that exact file to both the VS Code Marketplace and Open VSX.
The workflow requires repository Actions secrets named VSCE_PAT and OVSX_PAT. The equivalent local command is:
VSCE_PAT=... OVSX_PAT=... make publish-allUse make publish-marketplace or make publish-open-vsx when intentionally publishing to only one registry. make publish remains an alias for the VS Code Marketplace target.
Release and local builds use the parser revision pinned in server/go.mod. They do not require a sibling checkout.
make build-server-local # host language-server binary
make build-ext
make test-server
make test-ext
make test-editor-latency # synthetic editor-path regression gateLocal extension JavaScript is always dist/extension.js (webpack via make build-ext or npm run package); out/ is only the test harness.
To build against a local parser checkout:
make build-server-dev LOCAL_PHP_PARSER_DIR=/path/to/go-php-parser
make test-server-devSettings live under phpstrom.* in VS Code. The ones that affect behaviour today:
phpstrom.enablephpstrom.environment.phpVersion/phpVersionOverride/includePathsphpstrom.files.associations/files.exclude/files.maxSizephpstrom.stubsphpstrom.diagnostics.enable/run/workspaceScanOnStart/exclude/overridesphpstrom.diagnostics.analysis.*(style and side-effects default off)
phpstrom.diagnostics.overrides example:
{
"phpstrom.diagnostics.overrides": {
"PSR1.Classes.ClassDeclaration.PascalCase": {
"classes": ["/^Legacy_/", "SpecialClass"]
}
}
}Format, completion use-insert, PHPDoc generation, code lens, and inlay-hint settings exist in the schema but have no working Go providers yet.
One VSIX bundles language-server binaries for darwin-arm64, darwin-x64, linux-arm64, linux-x64, win32-arm64, and win32-x64.
MIT. Source: https://github.com/ayanozturk/vscode-php-strom