mewesk/twig-spreadsheet-bundle
A Symfony bundle that brings Twig templating to spreadsheet generation, letting you design XLSX, CSV, and other spreadsheet files with familiar Twig syntax instead of low-level APIs. Build clean, reusable templates for reports and exports, keep layout logic separate from PHP code, and render dynamic...
.xlsx deliverable by editing a Twig-templated spreadsheet, while engineering only supplies the data array. If your roadmap has repeated "can we change the columns/formatting on the monthly report?" tickets, that's the signal this pattern solves.pre_calculate_formulas bug, style-merge behaviour where non-array values were merged instead of overriding) and adds capability (see below). For a tech-radar or dependency-review exercise, this is a good teaching case: "abandoned" is a point-in-time observation, not a permanent property — re-check archive status, open-issue responsiveness, and supported upstream versions on every review cycle rather than restating a stale verdict.xlscellindex / xlsrowindex expose the current render position to the template — this is what makes alternating row styling, conditional per-row footers, and "start writing here" layout regions possible without hard-coding offsets. Any template-driven export design we own should have an equivalent..xlsx. Useful evidence that "give me this in Excel" and "give me a CSV my ERP can ingest" are the same product surface with different writers, not two epics.Consider the pattern (or a fork) when:
xlscellindex / xlsrowindex functions are the minimum viable API for this, and they are now present..xlsx and configured CSV from one template definition — 1.1's CSV writer options remove what used to be a two-pipeline design.Look elsewhere — or build directly on PhpSpreadsheet — when:
maatwebsite/excel with Blade views (same idea, maintained, Laravel-native) or write a thin PhpSpreadsheet wrapper. Release 1.1 does nothing to change this — it adds template functions and writer options, not a Laravel bridge.openspout) or CSV-first is the better call. 1.1's "improved performance" is not a streaming story, and its CSV improvements are about format configuration, not throughput.To executives: This is a small, MIT-licensed open-source library that demonstrates a genuinely useful idea — letting the business own the formatting of Excel and CSV reports instead of filing engineering tickets for every column change. Our prior read was "archived, avoid." That has changed: a 1.1 release has landed with real bug fixes (image caching, formula pre-calculation, style overrides) and modest new features (position helpers in templates, configurable CSV output). We still do not recommend taking a dependency today, for two unchanged reasons: it is Symfony-only while our stack is Laravel, and one release after a multi-year gap is not yet a maintenance track record. There's no license cost either way; the question is only whether we carry the maintenance and security risk ourselves.
To engineering: The verdict moves from "do not adopt, treat as reference" to "still do not adopt, but re-open the re-evaluation checkbox and treat it as a live reference." Two things changed that are worth copying into whatever we build:
xlscellindex, xlsrowindex) — this, not cell writing, is what makes banded rows and region-based layouts feasible in a template DSL..xlsx, delimited CSV with custom separators). Design the writer as an interface from day one.Unchanged: an internal fork is still a two-to-three week build (template format, sandboxed render path, versioning, queue for large exports). Before anyone proposes adopting upstream, require a check of its un-archived status, supported PhpSpreadsheet/PHP matrix, and issue triage cadence — the release notes make no dependency claims, so the historical PHP-8 and version-pin risk is unproven either way.
Recommendation: Do not adopt — unchanged — but downgrade the risk framing from "abandoned" to "low-activity, intermittently maintained." Keep building on maintained components (PhpSpreadsheet or a streaming writer, with Blade on Laravel), and carry the two 1.1 ideas — position-aware templates and pluggable writers — into that design. Re-check the upstream repo at the next dependency review; if a second and third release follow with current PhpSpreadsheet/PHP support, this becomes a legitimate fork candidate even for a Laravel shop. It remains a same-day prototype option only if we move to Symfony.
How can I help you explore Laravel packages today?