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.
Architecture fit
Liquid facade. The v0.7 line moves it onto Blade's model: templates compile to PHP artifacts that are opcache-able and warmable via php artisan optimize. That is the single most architecturally significant change — it converts Liquid from an interpreted sidecar into a first-class, cacheable view layer.view() and the Liquid facade, which removes a prior inconsistency where the two entry points could behave differently under caching. Fewer divergent code paths is a governance win, not just a perf win.auth, guest and env tags now compiling means conditional/gated rendering gets the same treatment. Worth confirming these compile to something equivalent semantically — environment-dependent compiled artifacts are a classic source of "works in staging, wrong in prod" bugs if the compiled output is cached across environments.Integration feasibility
illuminate/contracts ^11.28 sets a hard floor on Laravel 11.28, and keepsuit/liquid ^0.13 drops 0.7–0.12 of the core engine. Anyone on Laravel 10, or on an early 11.x, is blocked behind a framework upgrade first.0.7.0-beta.1) built on a 0.x core library. Neither carries a semver stability guarantee on the underlying engine. That is acceptable for a spike, questionable for a production dependency of record.Technical risk
.0 ({{ 3.0 }} → 3.0) and math filters switch to decimal arithmetic. Anything rendering money, quantities, percentages or metrics to a downstream consumer — JS, CSV export, API payload, transactional email — can change format with no error raised. Decimal arithmetic may also change rounding on edge values.if/elsif/unless conditions, empty tags, duplicate for/else sections and missing filter arguments now throw SyntaxException at parse time. These are latent template bugs that were previously tolerated; they become hard failures, and likely only on rarely-exercised branches — i.e. in production, on the least-tested page.liquid:cache is wired into php artisan optimize, a single malformed template can now fail the optimize step and therefore the release, rather than failing one request. Fail-fast is the right posture, but it means one tenant's bad template can block everyone's deploy.Key questions
illuminate/* floor force other package upgrades?stream() now, or is the honest answer "stay on 0.6.3 until 0.7.0 GA"?Stack fit
keepsuit/liquid ^0.13. Natural placement is Blade for application chrome and layout, Liquid strictly for user- or tenant-authored content. That containment keeps the stricter parser and the output changes off our own critical pages and limits who is exposed to them.Migration path
stream(). Otherwise pin 0.6.3, track 0.7.0 GA, and take the fixes then — we lose nothing but time, and we avoid carrying a beta plus a 0.x engine bump simultaneously.Compatibility
composer.json for any direct or transitive pins on illuminate/contracts and sibling illuminate/* packages; a 11.28 floor can ripple and drag other upgrades with it.Sequencing
if/elsif/unless without a complete condition.SyntaxException. This converts production 500s into build failures — do this before anything else.liquid:cache in staging; measure cold start vs. 0.6.3; confirm invalidation behaves on template edit.Maintenance
liquid:cache now runs as part of php artisan optimize, so every deploy pipeline, image build and any scheduled optimize inherits it. Someone must own that step and know what it does on failure.keepsuit/liquid changelog. Budget for that permanently, and pin exact versions rather than using ranges.Support
0.x core is a low-commitment support surface: no deprecation windows, no LTS. Assume we may need to patch or vendor a fix, and confirm someone on the team can read the compiler.Scaling
stream() reduces peak memory and improves TTFB on large renders. Both help linearly with traffic, unlike the interpreted path.optimize in the image build, not at container start, or autoscaling events will produce latency spikes. More containers and more tenants mean proportionally more cache to warm and more templates to invalidate.stream() is a targeted tool, not a default: use it for large, low-interactivity documents only.Failure modes
SyntaxException on a template that previously degraded gracefully — 500 on a page that "worked." Mitigate with the CI parse gate; do not rely on manual review..0 retention and decimal math — no error, wrong display or wrong downstream parse. Worst failure class; mitigate only with golden-file diffing.optimize runs at release time. Better than a per-request failure, but it changes who owns the blast radius — one tenant's content can block a release.stream() has flushed headers we cannot switch to an error page or adjust status. Restrict streamed views to the simplest, best-tested templates.env tags if artifacts are shared across environments.Ramp-up
How can I help you explore Laravel packages today?