mewesk/twig-excel-bundle
Twig Excel Bundle brings Twig templating to spreadsheet generation, letting you build Excel workbooks from familiar template files instead of verbose PHP code. Define layouts, loops, and data binding in Twig, then export clean .xlsx reports directly from your Symfony application.
Architecture fit — poor, but not for the reason the description implies. mewesk/twig-excel-bundle is a Symfony bundle, not a Laravel package. It ships a Bundle subclass registered through AppKernel/bundles.php, publishes services via Symfony DI YAML/XML, and registers its Twig extension through the twig.extension service tag. Laravel has no equivalent runtime for BundleInterface, no service tagging semantics, and no kernel-based bundle discovery. The only genuinely reusable asset is the Twig extension class itself — a thin wrapper that maps a template render to a PHPExcel_Writer_* call. Everything around it is Symfony-shaped and would be discarded.
Second, larger problem: the transitive dependency is dead. The bundle is built on PHPExcel, which was deprecated in favour of PhpSpreadsheet and has had no release since 2015. PHPExcel does not run cleanly on PHP 7.2+ (deprecation-level failures) and breaks outright on PHP 8.x. Any Laravel application on a supported PHP version cannot install this dependency graph without a fork. The repository is archived, has 37 stars and zero dependents, meaning no downstream project is exercising the code path and no one is filing or fixing issues.
Integration feasibility. Viable only as an extraction exercise, not an installation:
{% excel %}-style tags) into app/Support.PHPExcel_* call at the PhpSpreadsheet equivalents (PhpOffice\PhpSpreadsheet\Writer\Xlsx, IOFactory).rcrowe/twigbridge or a manually bound Twig\Environment).type: symfony-bundle metadata, and any Symfony-version constraints entirely.That is a half-day to two-day spike for a developer fluent in both Twig and PhpSpreadsheet, and it produces a first-party class you own rather than a dependency you inherit.
Technical risk — high. Archived source, EOL spreadsheet engine, no security response path, PHP 8 incompatibility, and zero field validation from dependents. The opportunity score of 4.96 reflects a real, underserved problem space (server-side spreadsheet templating from a view layer), not the quality of this artifact.
Key questions before any decision:
Stack fit. For a Laravel codebase: do not composer require this package. For a Symfony 2.x/3.x codebase: the bundle is structurally correct but the PHPExcel floor still caps you at an unsupported PHP runtime, so the same fork-and-modernise work applies.
Recommended path — adopt the pattern, not the package. Reimplement the Twig-to-spreadsheet bridge on PhpSpreadsheet, which is actively maintained, PHP 8 compatible, and supports the same template-load-then-write workflow (IOFactory::load($template) → set cell values → new Xlsx($spreadsheet) → save()). This preserves the bundle's core value proposition — designers edit a real spreadsheet template, developers render it from a view — without inheriting the dead dependency.
Alternatives worth benchmarking in the same spike:
maatwebsite/excel (Laravel Excel) — Blade-based export views, PhpSpreadsheet underneath, active ecosystem. Closest analogue to the Twig-templating idea and the natural default for a Laravel stack.openspout/openspout (successor to box/spout) — streaming writer, dramatically lower memory, but no template/style preservation.Compatibility notes if forking. Expect Twig 1.x-era extension APIs (pre-AbstractExtension interfaces), Symfony 2/3 service definitions, and PHPExcel's underscore-separated class names throughout. Budget for a mechanical rename pass (PHPExcel_ → PhpOffice\PhpSpreadsheet\) plus targeted fixes where method signatures changed — writer constructors, setCellValue behaviour, and style array keys are the usual break points.
Sequencing.
Maintenance. Effectively infinite and entirely yours. The upstream is archived, so there is no path to a patch — every future PHP minor, every Twig major, and every CVE touching the spreadsheet engine becomes your ticket. Adopting the package means inheriting PHPExcel's unpatched vulnerability surface and owning the Symfony-to-Laravel port. Adopting the pattern on PhpSpreadsheet means a normal, upgradable dependency with an active maintainer.
Support. No community to lean on: 37 stars and zero dependents means no Stack Overflow corpus, no issue history worth reading, and no third party who has hit your bug. Onboarding documentation is the README alone. PhpSpreadsheet and Laravel Excel, by contrast, have substantial documentation and answerable search results.
Scaling. PHPExcel's object-per-cell model is memory-hungry — roughly a kilobyte or more per populated cell once style and formula objects are counted — so a 100k-row export can push past default memory_limit and produce an opaque fatal rather than a clean error. There is no streaming writer in this bundle. If export volume is non-trivial, this is disqualifying on its own; route through PhpSpreadsheet with cell caching enabled, or through OpenSpout for pure tabular output, and push generation to a queue with the file handed back via signed URL.
Failure modes to design against.
=, +, -, or @, producing CSV/XLSX formula injection in files opened by downstream users.Ramp-up. Low for a Symfony developer — the bundle's surface is small and the Twig-tag pattern is intuitive. Moderate for a Laravel team, because the mental model (bundle registration, service tags) has no direct analogue and the fork requires reading Symfony-era code. Either way, the spreadsheet ramp-up — template placeholders, style preservation, memory behaviour — dominates and is identical across all four options, which is the strongest argument for choosing the maintained library and not paying the port cost twice.
Bottom line. Do not adopt. The package is archived, the engine beneath it is end-of-life, it targets the wrong framework, and it has no dependents to validate it. Extract the templating idea, implement it on PhpSpreadsheet or Laravel Excel, and treat this repository as a design reference at most — which is roughly the value its 37 stars and 4.96 opportunity score imply.
How can I help you explore Laravel packages today?