phpantom

package
v1.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package phpantom manages the phpantom_lsp PHP language server binary that powers tinker autocomplete, diagnostics, and hover in the web UI.

phpantom_lsp (https://github.com/PHPantom-dev/phpantom_lsp) is a single, self-contained Rust binary: it bundles phpstorm-stubs and the Mago parser and needs no PHP runtime to analyze a project. That lets lerd run it on the host pointed at the project directory, alongside the other host tools it already manages (fnm, mkcert, composer) in BinDir, rather than baking it into the per-version PHP container images.

Index

Constants

View Source
const Version = "0.8.0"

Version pins the phpantom_lsp release lerd installs. Bump alongside a tested upgrade; the binary is re-fetched when the on-disk copy is missing.

Variables

This section is empty.

Functions

func BinPath

func BinPath() string

BinPath is the managed location of the phpantom_lsp executable.

func EnsureBinary

func EnsureBinary(ctx context.Context, w io.Writer) error

EnsureBinary downloads and extracts phpantom_lsp into BinDir when it is not already present. It is safe to call on every connection: once installed it returns immediately. The download honours ctx, so a caller whose request is cancelled (e.g. the browser tab closing mid-download) aborts the fetch.

func Installed

func Installed() bool

Installed reports whether the managed binary is present and matches the pinned Version. A bare binary with no (or a mismatched) stamp counts as not installed so EnsureBinary upgrades it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL