Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lsp Laravel Package

laravel/lsp

Laravel LSP adds framework-aware editor support for Laravel and Blade, with completions, hovers, diagnostics, document links, Go to Definition, and code actions across routes, views, translations, config, and env vars. Install globally via Composer and launch over stdio from your project root.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Laravel LSP is an out-of-band developer tool, not a runtime dependency. It installs globally (composer global require laravel/lsp) and speaks JSON-RPC over stdio as a long-lived process, so it never appears in a project's composer.json, lockfile, or deploy artifact. That is the single most important architectural fact for a TPM: adoption carries zero production blast radius and requires no change to CI, container images, or release process. The Dependents: 0 figure should not be read as a red flag — a globally installed editor binary is structurally incapable of appearing as a Composer dependent, so this metric is uninformative here rather than negative.

Integration feasibility. High, with caveats that are all local-environment rather than application-architecture. Official launch extensions exist for VS Code, Cursor, Zed, and Sublime Text; Neovim (0.11+) and OpenCode require short config blocks. The server's phpEnvironment detection chain (Herd → Valet → Sail → Lando → DDEV → local PHP) is the key integration lever for teams whose PHP lives inside a container — but "auto" is heuristic, and a phpCommand override exists precisely because heuristic detection fails. Treat explicit phpCommand configuration as the default for Sail/DDEV/Lando shops rather than an exception.

Technical risk. Four items worth flagging to engineering leadership:

  1. Distribution surface. Prebuilt binaries cover macOS arm64/x64, Linux arm64/x64, and Windows x64 only. No Windows arm64 and no documented Alpine/musl support — a real gap for teams on ARM Windows machines or Alpine-based dev containers.
  2. Cross-platform behavioral divergence. AmpStdioTransport dispatches requests concurrently while StdioTransport handles one message at a time and is used on Windows. Windows users should expect slower, serialized behavior and a different class of latency bugs.
  3. Filesystem side effects. pestGenerateDocBlocks defaults to true and writes to storage/framework/testing/_pest.php, regenerating on test and autoload changes. This creates in-repo churn that must be deliberately gitignored or committed as policy — an easy source of noisy diffs.
  4. Diagnostic collision. Sixteen feature domains each ship diagnostics that default to true. Teams already running Intelephense and PHPStan will see overlapping or contradictory squiggles, which is the fastest route to wholesale disablement.

Governance risk is low-to-moderate: MIT licensed, published under the official Laravel organization (strong alignment with framework releases, forkable if abandoned), but with ~304 stars and a very recent release cadence, the versioning and support policy is unproven. This is a "pilot, don't standardize" profile today.

Key questions for the maintainers / your own team:

  • Is there a support and deprecation policy, and is the server versionable per project rather than only globally? Global-only installation means every developer drifts independently.
  • Does the server perform any network calls, or is all analysis strictly local? The README is silent; confirm before endorsing for regulated codebases.
  • What are the memory and indexing costs on a large monorepo, and can indexing be scoped to a single application directory within a multi-app repo?
  • Does the server require a working vendor/ and autoloader to index, and what is the degradation behavior when it is absent or stale?
  • Which diagnostics overlap with PHPStan/Intelephense, and what is the recommended flag set to run alongside them?

Integration Approach

Stack fit. Any Laravel application on a supported editor and OS. It is additive tooling that sits beside existing PHP static analysis rather than replacing it: PHPStan and Pint remain the CI-enforceable gates, while Laravel LSP is the editor-time aid that catches Laravel's string indirection (view(), route(), config(), __(), env()) that generic PHP tooling cannot resolve. Position it explicitly as a complement to Intelephense, not a substitute — the differentiator is Blade and framework-string navigation, not general PHP intelligence.

Migration path. There is nothing to migrate. The correct framing is an opt-in pilot with a documented rollback that consists of "uninstall the extension." No sequencing dependency on application upgrades, no coordination with release trains, no data migration.

Compatibility notes to encode in the rollout doc:

  • Gate server startup on the presence of an artisan file, mirroring the Neovim root_dir callback, so the server does not attach in non-Laravel PHP projects or at a monorepo root above the app.
  • Pin phpCommand explicitly for Sail/Lando/DDEV teams instead of relying on auto.
  • Require Neovim 0.11+; do not promise Windows arm64.
  • Decide and document the pestGenerateDocBlocks / pestHelperFilePath policy (gitignore vs. commit) before the first PR lands.
  • Start from all-defaults-enabled, then disable noisy domains (likely config/env/asset diagnostics) via initializationOptions once pilot feedback identifies collisions.

Sequencing (4–6 weeks, low effort):

  1. Week 1 — Instrumented pilot. Two or three volunteers, one editor, one representative application. Success criterion is concrete: the five jumps (view, route, config, __, env) resolve to definition, and a deliberately broken view('does.not.exist') produces a diagnostic.
  2. Week 1–2 — Failure-mode triage. Confirm PATH resolution in a fresh shell, correct project root, PHP command detection per stack, and cold-index latency. Capture every failure verbatim into the onboarding doc.
  3. Week 2–3 — Publish per-repo docs/editor.md. Global install line, the config block for the two or three editors actually in use, a restart instruction, and the four-item troubleshooting checklist. Do not mandate a single editor; editor diversity is the package's advantage.
  4. Week 3–5 — Team-wide opt-in. Expand to the broader team, keeping adoption voluntary per editor. Collect flag-level feedback rather than a thumbs-up/thumbs-down.
  5. Week 6 — Re-evaluate at the next release. Pin a supported version in the doc, and reassess whether the diagnostics are trusted enough to remain on by default.

Operational Impact

Maintenance. Minimal but non-zero, and it lives entirely on developer laptops. Global installation means no centralized version control: developers will run different versions unless you publish a "supported version" line and a composer global update laravel/lsp cadence (quarterly, or on each release you validate). Ownership belongs with Developer Experience or platform engineering at an estimated one to two hours per month. The upside of global-only distribution is that there is no dependency-bump PR queue and no lockfile review burden.

Support. Expect a small, repeating ticket taxonomy: command not found (global Composer bin not on PATH), server not attaching (wrong root directory), no diagnostics (cold index not finished), PHP detection failures (Sail/DDEV without phpCommand), and duplicate diagnostics (collision with Intelephense/PHPStan). A four-line troubleshooting checklist resolves most of these without escalation. Limit the officially supported editor matrix to two or three editors to keep the support surface bounded — the extensions are thin launchers, so nearly all variability is editor config, not server behavior.

Scaling. Costs scale per developer, not per request, and never touch production infrastructure. The scaling ceiling is the project index on large repositories: indexing fires on initialized, and watchers fan didChangeWatchedFiles out to each FileWatcher to invalidate matching ProjectIndex entries. On a large monorepo this means meaningful laptop CPU and memory plus cold-start latency on first open, and multi-app repositories risk indexing the wrong tree unless the root is gated correctly. There is no shared or remote server mode, so there is no server-side capacity planning to do — but also no way to amortize indexing across a team.

Failure modes, ordered by severity:

  • Silent non-start. The most damaging failure: the editor attaches cleanly and simply offers nothing, so users conclude the tool is useless rather than broken. Instrument this with a smoke test in the onboarding doc.
  • False-positive diagnostics. Erodes trust faster than any missing feature and reliably triggers wholesale disablement. Mitigate with per-domain flags and a documented "known false positives" list.
  • Stale index after large refactors or renames. Symptoms appear as wrong go-to-definition targets, which is worse than no navigation because it misleads. A restart instruction covers this.
  • Code-action file mutation. envViteQuickFix edits files on invocation; users should be told these are ordinary editor edits subject to review, not magic.
  • Pest docblock churn. Regenerated helper file appearing in diffs and reviews if not gitignored.
  • Windows degradation. Serialized transport yields slower responses; set expectations rather than treating it as a defect.

Ramp-up. Near zero for VS Code, Cursor, and Zed users — install the extension and open the project root. Budget 15–30 minutes for Neovim and OpenCode users for the config block and root gating. The realized benefit is concentrated in Blade-heavy and route-heavy codebases and in new-hire onboarding, where jumping from route('users.show') to its registration replaces a global grep. Resist the urge to build a hard ROI model: this package has no CI gate and no telemetry, so its value is a developer-experience judgment best supported by an onboarding survey and new-hire time-to-first-PR rather than a fabricated productivity number. Given a moderate overall assessment (~33) and a small but official maintainer footprint, the defensible position is "recommended and supported, adoption voluntary" — not a mandated standard.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections