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

Ux Live Component Laravel Package

symfony/ux-live-component

Symfony UX Live Components let Twig components auto-update on the frontend as users interact, inspired by Livewire and Phoenix LiveView. Build reactive interfaces without writing JavaScript.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor for a Laravel codebase, strong for Symfony. symfony/ux-live-component is a Symfony UX package, not a framework-agnostic PHP library. It is the server-rendered, stateful-component model analogous to Livewire: a Twig component is dehydrated to the DOM, user interactions fire AJAX requests back to a Symfony controller, the component re-hydrates, re-renders, and the response is merged client-side via morphdom. That architecture is conceptually identical to Livewire, but every implementation dependency is Symfony-specific: TwigComponent, HttpKernel, the DI container, Serializer/PropertyInfo for LiveProp hydration, the routing import for /_components, and a Stimulus controller registered through assets/controllers.json (AssetMapper or Webpack Encore). None of that maps onto Laravel's container, Blade compiler, or Vite integration. There is no adapter path — using this in a Laravel app means running Symfony alongside Laravel.

Integration feasibility — feasible only as a second runtime, not as a package install. Two viable shapes: (a) a standalone Symfony service owning a slice of UI (forms, wizards, dashboards) embedded into the Laravel app via reverse proxy, iframe, or shared-session SSO; (b) a broader Symfony adoption where Live Components is one of several UX packages. Both carry real cost: dual auth/session bridging, dual asset pipelines, dual deploy cadence, and CORS/same-origin configuration because 3.x removed CSRF tokens and now relies on same-origin/CORS plus an X-Requested-With: XMLHttpRequest header check. If the estate is Laravel-only, the correct recommendation is Livewire, and this package should be scored as "reference architecture / competitive benchmark," not as a dependency. The 23.58 composite score and 0 dependents largely reflect that ecosystem mismatch, not package quality.

Technical risk — moderate-to-high, concentrated in version drift and security churn. Evidence from the changelog:

  • Aggressive BC cadence. BC breaks in 2.4, 2.5, 2.7, 2.8, and again in 3.0 (CSRF argument removed, LegacyLivePropMetadata removed, PropertyInfo compat layer dropped). The 2.8 change to automatic serializer (de)hydration and to parent→child re-render semantics is the kind of break that silently changes behavior in production forms.
  • Steep platform floor. 3.0 requires PHP 8.4 and Symfony 7.4. That is a hard gate on the host application, not an incremental upgrade.
  • Security-sensitive upgrade semantics. 3.1 changed the request checksum computation; the changelog explicitly states users with payloads signed before the upgrade must reload the page. In practice that means in-flight users get broken components at deploy time unless you drain or version the endpoint.
  • Read-only sub-tree split. Issues and PRs live in symfony/ux. Operational consequence: you cannot watch this repo for triage signal, and your CVE response clock is tied to the monorepo's release train, not yours.
  • Adoption signal is understated. 165 stars / 0 dependents understates real usage — it's a split of a flagship Symfony repo backed by Symfony core maintainers and sponsored by Mercure.rocks. Treat it as well-governed but fast-moving, not as an unmaintained hobby package.

Key questions to resolve before any commitment

  1. Do we have a Symfony runtime today, or is this purely a "what does the Livewire-equivalent look like" evaluation? If the latter, close it and benchmark Livewire instead.
  2. Which PHP/Symfony baseline are we on, and is a PHP 8.4 + Symfony 7.4 floor acceptable in the planning horizon?
  3. What is the actual user-facing problem — progressive enhancement of server-rendered forms, or full SPA avoidance? Live Components fits the former; it is a poor fit for high-frequency, low-latency interactions.
  4. Who owns the Stimulus/AssetMapper toolchain, and do we already have it running anywhere?
  5. Can we tolerate per-interaction server round trips and server-side re-render cost for the target screen's traffic profile?
  6. Is there budget for a Symfony-competency spike, or would this be the team's first Symfony code in production?

Integration Approach

Stack fit matrix

Target stack Fit Notes
Symfony 7.4+ / PHP 8.4, Twig + AssetMapper Strong Native path; install bundle, import routes with /_components prefix, add live to assets/controllers.json
Symfony 6.x / 7.0–7.3 Blocked on 3.x Pin to a 2.x line and accept a maintenance branch
Laravel + Blade + Livewire None Duplicate concept, incompatible runtime; use Livewire
Laravel + Symfony sidecar Conditional Works only with explicit session/auth bridge and CORS design
Laravel + Twig via twigbridge Not recommended TwigComponent relies on Symfony DI, kernel events, and the Serializer; twigbridge gives you templating, not the component runtime

Migration path

  • Do not port Laravel/Livewire components. The mental model transfers (props, actions, data-model), the code does not. Re-implement on the Symfony side, or keep the feature in Laravel.
  • If adopting Symfony: stand up the sidecar as an independent deployable, own its own route prefix, and expose only complete UI surfaces (a multi-step form, an admin table) rather than partial fragments of Laravel-rendered pages. Fragments create shared-layout and asset-ordering problems that will consume the entire schedule.
  • Session and identity: decide up front between shared cookie domain + shared session store, or signed short-lived tokens minted by Laravel and verified by Symfony. The latter is more work but decouples deploys.
  • Assets: this package ships TypeScript sources and needs a Stimulus controller registered through AssetMapper or Encore. If the Laravel side uses Vite, accept two asset pipelines for the sidecar's surface — do not attempt to route Symfony UX controllers through Vite.

Compatibility checklist before first commit

  • PHP 8.4 and Symfony 7.4 floor satisfied in CI, not just locally.
  • Route import uses prefix: /_components (the 2.6 change made the prefix mandatory).
  • X-Requested-With: XMLHttpRequest present on all component requests (3.1 requirement) — check proxies and API gateways don't strip it.
  • Same-origin/CORS policy explicitly configured, since 3.0 relies on it in place of CSRF tokens.
  • Fingerprint/checksum secret is configurable (2.23) and set per environment, and is stable across deploys or you accept forced page reloads on release.
  • If any LiveProp holds Doctrine entities, confirm the serializer configuration — 2.8 made serializer (de)hydration opt-in via useSerializerForHydration: true.

Sequencing

  1. Two-week spike (no production commitment). One Symfony sidecar, one non-critical screen (a settings form with validation), full deploy to staging including the asset pipeline. Success criteria: renders under load, survives a rolling deploy without breaking in-flight sessions, error path visible.
  2. Deploy-semantics rehearsal. Ship the spike twice in a week to prove the checksum/versioning story and confirm no user-visible breakage.
  3. Decision gate. Only proceed if the spike also answers the "why not Livewire / why not Stimulus controllers + Turbo" question with numbers.
  4. Production slice. One bounded surface, feature-flagged, with a documented rollback to a server-rendered form.
  5. Second slice only after the first has run a full release cycle.

Operational Impact

Maintenance. You inherit a dependency on a fast-moving monorepo release train with a documented history of BC breaks and security-driven behavior changes. Budget for a named owner who reads the Symfony UX changelog every release, plus a pinned minor version and a tested upgrade window. Because the repo is a read-only split, your team cannot patch locally upstream — you either vendor a fork (expensive) or wait for the monorepo.

Support. No commercial support tier; community channels only, with the Symfony core team as de facto maintainers and Mercure.rocks as sponsor. That is adequate governance for a low-criticality UI layer and inadequate for a revenue-critical checkout flow without a fallback path.

Scaling. The model is server-render-per-interaction. Each keystroke-with-data-model, action, and child-component update is an HTTP request that re-hydrates props, re-runs the component, and re-renders a template. Consequences: application servers, not CDNs, absorb interaction load; request payloads carry dehydrated prop state (large props mean large requests, partly mitigated by the 2.8 fingerprint performance fix); and the 2.5 batching change means concurrent interactions serialize into one request — better for consistency, worse for perceived latency on slow actions. Mitigations available in-package: loading="defer"|"lazy" (2.17), min_length/min_value input modifiers (2.28) to suppress unnecessary requests, and |norender on model updates.

Failure modes to instrument

  • Stale payload after deploy — checksum mismatch breaks live components for users mid-session. Highest-probability, highest-blast-radius failure. Monitor component 4xx rate with a deploy marker overlay.
  • Hydration rejection is silent by design — since 2.8, invalid user data falls back to the last valid value rather than erroring. Good for UX, bad for observability; server-side logs will not show the user's intent.
  • Morphdom smart-render conflicts — JS that mutates DOM inside a component is preserved, with documented limitations; third-party widgets (date pickers, rich text, maps) are the usual casualties. Validate on any page with a JS widget before committing.
  • Child component re-render ordering — separate AJAX call after the parent completes; nested interactive components are the package's historically weakest area and have consumed multiple point releases.
  • Asset controller not registered — the 2.7 rename from typed to live in assets/controllers.json is a classic silent-no-op: page renders, nothing is interactive. Add a smoke test asserting interactivity, not just HTTP 200.
  • Debug modal leakage — unexpected AJAX errors surface in a modal (2.5) intended for debugging; confirm it's suppressed or restyled in production.
  • Proxy/gateway header stripping — the 3.1 X-Requested-With requirement breaks behind gateways that normalize headers.

Ramp-up. A competent Laravel developer already holds the mental model (props, actions, server round trips) and will read Live Component templates fluently, since Twig and Blade are near-isomorphic for the constructs this package uses. The real cost is Symfony: container wiring, attribute-based configuration (#[AsLiveComponent], #[LiveProp]), the Serializer/Normalizer stack, and the AssetMapper pipeline — call it three to six weeks to first productive contribution and roughly a quarter to genuine ownership of a production surface. Add a half-day per developer on the morphdom/data-live-id and hydration-invalidation semantics, which are the non-obvious parts. If the team has no Symfony footprint whatsoever, that ramp cost should be weighed against simply using Livewire, which the team already knows.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin