lmc/spirit-web-twig-bundle
Symfony bundle that integrates the Spirit Web design system with Twig, offering reusable UI components, Twig extensions, and simple configuration so PHP teams can build consistent, accessible interfaces faster. It streamlines component rendering and keeps templates aligned with Spirit's design token...
Architecture fit
The package is a Symfony bundle, not a Laravel package. Everything it does is bound to Symfony kernel conventions — a Bundle subclass, a DI Extension, Twig namespace/path registration, and asset-resolution hints. There is no service provider, no publishable config, and no Blade surface. In a Laravel codebase this is a framework-boundary mismatch: the value proposition ("Spirit components available in Twig") is real, but Laravel does not supply the container bootstrapping that makes it true.
Critically, the bundle does not ship the design system itself. It emits markup — class names, modifier conventions, accessible attribute wiring — against a separately installed @lmc-eu/spirit-web front-end package. That means the actual asset — the HTML/CSS/JS contract — is portable to Laravel. Only the Twig convenience layer is not. As a TPM, that distinction is the whole decision: we would be adopting a markup contract, and the bundle is one of two possible delivery mechanisms for it.
Integration feasibility Two paths, and only one is credible for a Laravel product:
composer require plus bundle registration, then follow the design system docs. Low friction, but only applies if the consuming application is genuinely Symfony.twigbridge can graft a Twig engine onto Laravel and register Twig extensions, but it does not emulate bundle bootstrapping; extension registration, template namespacing, and asset paths would all be reconstructed by hand, and the app would carry two template engines. The cheaper and more stable path is npm install @lmc-eu/spirit-web plus a small set of Blade partials mirroring the reference markup. We would copy maybe four to six components to validate, not reimplement a component library.Technical risk Elevated, and driven almost entirely by adoption rather than code quality. One star and zero dependents means no community backstop, no third-party regression signal, and no observable commitment to a release cadence outside the maintainer's own roadmap. The scoring corroborates this: overall 6.2 with opportunity at 28.9 reads as "capability is real, strategic upside relative to integration cost is thin."
Secondary unknowns that materially affect the estimate:
spirit-web behind an init layer the Twig bundle does not wrap.Key questions
composer.json declare? Is Twig 3.x mandatory?spirit-web ourselves?Recommendation: do not take a production dependency on this bundle in a Laravel codebase. Evaluate @lmc-eu/spirit-web on its own merits, and treat the bundle as relevant only where a genuine Symfony/Twig surface exists.
Stack fit Strong for Symfony 6/7 + Twig 3. Weak-to-absent for Laravel + Blade. The decisive question is not "is this a good package" but "is the consuming application a Twig application." Every downstream decision follows from that answer, and the opportunity score suggests the answer is usually no.
Migration path
twigbridge into Laravel solely to consume one component library. A second template engine in the mental model is a permanent tax for a marginal gain.Compatibility
Verify before committing: run composer require in a scratch Laravel project to surface Symfony polyfill conflicts; confirm asset delivery works under Vite rather than AssetMapper or Encore, since asset resolution is precisely where bundle assumptions leak; and check that the pinned spirit-web npm version matches the class names the Twig layer expects — these version independently and drift silently. If the bundle is used at all, pin both sides explicitly and treat the pairing as a tested tuple.
Sequencing
spirit-web in package.json, and document the class-name contract we depend on.Maintenance Assume we are the maintainer. With one star and zero dependents, no ecosystem absorbs upgrade pain. Budget a fork-to-internal-ownership plan from day one: vendor the package, or mirror the relevant Twig templates into our repo so a stalled upstream does not block a PHP or framework upgrade. Owning roughly a dozen markup templates is a tractable, bounded commitment; owning a dependency we cannot patch is not.
Support No vendor SLA. Support is GitHub issues on an OSS repository maintained by a media company's design system team, where our use case is peripheral to their internal priorities. There is no escalation path. That is acceptable for a CSS/class-name contract that we could reimplement from docs; it is not acceptable for a dependency sitting in the request-rendering path of a customer-facing application.
Scaling The templating layer scales trivially — it is compile-time markup generation and carries negligible runtime cost. The real payload is the CSS/JS bundle, so scaling reduces to standard asset strategy: hashed filenames, long-lived cache headers, CDN distribution. Note the consequence of forking: our asset pipeline diverges from upstream and we inherit responsibility for keeping class names current.
Failure modes
Ramp-up For a Blade-native team the bundle imposes a Twig learning curve in exchange for markup that is documented upstream anyway — negative ROI. The recommended ramp to the underlying capability is under a day: install the front-end package, read the component reference, port partials, verify behavior. Reserve bundle-specific onboarding for teams already fluent in Symfony and Twig, where the marginal cost is near zero.
Overall: the design system is worth evaluating; this specific bundle is a low-signal, low-adoption artifact whose value is fully realizable through the front-end package alone. Gate any adoption on a documented upstream release cadence and an explicit product decision that the target stack is Twig-first.
How can I help you explore Laravel packages today?