keepsuit/laravel-liquid
Laravel Liquid integrates the Liquid template language into Laravel, letting you render .liquid views with custom tags, filters, and Blade-style components. Ideal for Shopify-compatible templates, user-editable themes, and safe, sandboxed rendering in Laravel apps.
auth/guest/env tags being compiled in this release also mean conditional personalization and environment-specific output can be expressed in templates rather than hardcoded per tenant.view() and the Liquid facade, with a liquid:cache command wired into php artisan optimize. Previously, per-request parsing was a real ceiling on how aggressively we could put templates on hot paths (checkout emails, high-volume notifications). This changes the answer on "can we use Liquid on the critical path?" from probably not to yes, if we benchmark.Liquid::stream() opens up generating large reports, exports and long documents without buffering the whole render in memory — relevant if we want to serve generated PDFs/CSVs/feeds from templates.keepsuit/liquid 0.13. It forces a go/no-go decision with a real migration cost attached (see risks below), and it constrains our Laravel upgrade floor to illuminate/contracts ^11.28, i.e. Laravel 11.28+/12.Consider adopting when:
0.x package publishing beta releases, so API stability is not contractual.Look elsewhere when:
3.0, decimal arithmetic in math filters, parse-time SyntaxException on incomplete conditions, empty tags, duplicate for/else sections, missing filter args) will change or break stored templates.To executives: This upgrade turns our templating layer from a per-request cost into a compiled, cacheable asset, and it does so on a dependency line that is already the safe choice for letting customers edit their own content. The one-line version: customer-editable templates without letting customers run code. The concrete asks are modest — pin to an exact version, gate rollout behind a flag, and budget a short migration pass on existing stored templates.
To engineering: v0.7.0-beta.1 is a breaking release, but it buys real capability: Liquid views compile to PHP artifacts shared between view() and the Liquid facade, liquid:cache is now part of php artisan optimize, Liquid::stream() exists for large renders, and auth/guest/env tags compile instead of being interpreted. The cost is an upgrade floor (keepsuit/liquid ^0.13, illuminate/contracts ^11.28, support for 0.7–0.12 dropped) plus inherited output changes: integral floats now render 3.0, math filters use decimal arithmetic, and malformed templates that previously rendered garbage now throw SyntaxException at parse time.
Recommended posture — adopt, but as a controlled migration:
0.x minor bumps as breaking by default.SyntaxException. The new parse-time strictness is the good kind of breaking change — but only if we surface it before customers do.3 → 3.0 is the change most likely to be noticed by a merchant and least likely to be caught by our own tests.php artisan optimize populates the cache in the deploy pipeline and that template edits invalidate cleanly.How can I help you explore Laravel packages today?