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

Larastan Livewire Laravel Package

calebdw/larastan-livewire

Larastan Livewire adds PHPStan/Larastan support for Livewire components, helping static analysis understand public properties, computed properties, actions, validation, and view data so you catch type errors and undefined members before runtime.

Deep Wiki
Context7

Product Decisions This Supports

  • Adoption of static analysis as a quality gate for Livewire-heavy products. This package extends Larastan/PHPStan so that Livewire’s magic properties, methods, and component conventions are understood by the analyzer. That directly supports the decision to raise PHPStan levels and enforce them in CI rather than treating Livewire as an analysis blind spot.
  • Build vs. buy for internal tooling. The alternative is writing and maintaining a custom PHPStan extension for Livewire. At 63 stars and MIT-licensed, this is a low-cost, forkable dependency that removes a recurring internal tooling project from the roadmap.
  • Technical-debt and platform-hardening roadmap items. Enabling stricter static analysis on component-heavy UIs surfaces property typos, incorrect types, missing methods, and view-data mismatches at CI time instead of in production. This supports prioritizing debt-reduction and resilience work alongside feature delivery.
  • Framework upgrade planning. Livewire and Laravel upgrades frequently change magic property and lifecycle behavior. Type-aware analysis gives the team a safety net when upgrading, reducing the risk and estimated effort of major-version migrations.
  • Onboarding and developer experience investment. Typed component contracts make the codebase more legible to new engineers and reduce “works at runtime, fails on refactor” surprises. This supports decisions to invest in DX and documentation-as-code.
  • Refactor and modularization decisions. When deciding whether to split or restructure Livewire components, static analysis coverage is a prerequisite for doing so safely; adopting this package de-risks those initiatives.
  • Feature-level go/no-go on Livewire at scale. If the product is betting on Livewire for complex interactive surfaces, this package is part of the evidence that the stack can be governed with the same rigor as a typed backend.

When to Consider This Package

Consider adoption when all of the following are true:

  • The product uses Laravel + Livewire, and Livewire components carry meaningful business logic (forms, dashboards, multi-step flows) rather than trivial presentational markup.
  • The team already runs, or is preparing to run, PHPStan with Larastan in local development and CI.
  • The team is seeing analysis noise or false positives around Livewire magic properties, component instantiation, or view data — the classic signal that a framework-aware extension is missing.
  • There is a quality bar to enforce (e.g., “no new PHPStan errors,” higher analysis levels, or mandatory CI checks) and Livewire is currently the weak link.
  • The codebase is growing or changing hands, so refactor safety and onboarding clarity outweigh the cost of another dependency.

Look elsewhere, or defer, when:

  • The product does not use Livewire, or uses it only in isolated, low-risk admin screens.
  • The team does not run PHPStan/Larastan; adopting this alone delivers little without the underlying analyzer and CI discipline.
  • The project is a short-lived prototype or spike where static-analysis ROI is negative.
  • Version compatibility is unproven — confirm the package supports your exact Livewire, Larastan, and PHPStan versions before committing; small packages can lag framework releases.
  • Supply-chain tolerance is low. With ~63 stars, this is a niche dependency. If your organization requires active maintainer SLAs or broad community adoption, treat it as a fork-and-own candidate rather than a strategic dependency.
  • An official or first-party Livewire/PHPStan integration already covers your use case; prefer the maintained-upstream option.

How to Pitch It (Stakeholders)

For executives: This is a small, MIT-licensed open-source extension that closes a quality gap in our Livewire stack. It lets our existing static-analysis tooling understand Livewire components, so defects that would otherwise surface in production — mistyped properties, wrong method signatures, mismatched view data — are caught in CI instead. The cost is near-zero (no license, minimal integration effort), and the payoff is fewer production incidents, safer framework upgrades, and faster onboarding. It is a tactical enabler for our quality and technical-debt roadmap, not a platform bet.

For engineering leadership: We already invest in Larastan/PHPStan; Livewire is currently the blind spot that forces us to keep analysis levels low or accept noise. This extension restores type awareness for components, which lets us raise the analysis level, make CI checks meaningful, and refactor components with confidence. Integration is a Composer dependency plus a PHPStan configuration entry, with a short validation spike to confirm version compatibility.

Risk posture: Small community footprint (~63 stars) means we should pin the version, validate compatibility against our Livewire/Larastan/PHPStan versions, and be prepared to fork under MIT if maintenance stalls. The code surface is narrow and the license permissive, so the downside is bounded and the exit cost is low.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core