survos/js-twig-bundle
A Symfony bundle from Survos that streamlines integrating JavaScript into Twig templates, with helpers and configuration for managing scripts, assets, and dynamic front-end behavior alongside your Twig views.
survos/js-twig-bundle is a Symfony bundle. Its value proposition is entirely dependent on Symfony-only primitives: AssetMapper (importmap, no build step), StimulusBundle, Symfony UX Icons (ux_icon), the Symfony Router (path()), and Symfony's stimulus_* Twig helper namespace. Laravel has none of these — it ships Blade, Vite, and Alpine/Livewire/Inertia as its frontend story. There is no Laravel service provider, no Blade directive, and no Vite/AssetMapper bridge. Verdict: not adoptable in a Laravel codebase without importing Symfony's Twig + AssetMapper stack, which is a net-new platform commitment, not a dependency decision.twig-browser, avoiding duplicated markup in AJAX/Stimulus-driven widgets. That is progressive enhancement, not an SPA framework — it competes with Turbo/Hotwire and Live Components for the same "stop duplicating markup" budget line.symfony/twig-bundle, symfony/asset-mapper, symfony/stimulus-bundle, symfony/ux-icons, and the twig-browser JS lib inside a Laravel app — a second templating engine, a second asset pipeline, and two coexisting router surfaces. Not justifiable for the value delivered.include, embed, macro, or autoescape nuance outside its subset will silently diverge — blank blocks, wrong output, or mismatched escaping. The bundle's own helpers (path(), stimulus_*, ux_icon) exist to paper over that gap, which means the divergence surface is precisely where the package adds value.dump() calls, and the fix is described as a hack applied outside the upstream survos path. That is a maturity and governance signal about the project's CI, not a description of the package's function. Prior source assessments conflated the release note with the product and concluded this is a "debug-hygiene tool" — that reading is wrong and would misdirect budget.description.md, no API reference, no config schema, no upgrade guide). Bus factor 1, no SLA, no security policy. Treat as pre-adoption / pilot-only, and assume you may vendor or fork it.twig-browser's supported subset? Enumerate before spiking, not after.path(), stimulus_*, and ux_icon at parity with their server-side counterparts — including edge cases like parameterized routes and icon-set variants?symfony/*, PHP, and the twig-browser JS version? Can we pin all four?composer.json; symfony/asset-mapper and symfony/stimulus-bundle present and configured; symfony/ux-icons installed with an icon set resolved; importmap entries for twig-browser and the bundle's own JS resolvable; a non-production environment with the route-JSON endpoint enabled.stimulus-bundle and ux-icons co-requirements, twig-browser JS version, and whether Twig.js supports the Twig version we run. The Twig.js ↔ Twig version skew is the compatibility axis most likely to break silently, and it is the one the bundle cannot fix for you.twig-browser support.twig-browser releases against Twig releases, re-applying the 1.6.0-style patch after upstream merges, and auditing every new template construct for Twig.js support. Budget this as standing frontend-platform overhead, not a one-time install. Bus factor 1 means at some point we own the code.path() throws client-side, breaking widgets whose server rendering works fine; asymmetric failure that tests may miss.ux_icon resolves server-side but the icon set isn't in the client importmap; icons silently vanish.stimulus-bundle upgrade breaks module loading at runtime, not build time (there is no build step to catch it).How can I help you explore Laravel packages today?