swp/templates-system-bundle
Symfony bundle for managing reusable templates and layouts. Provides a central template registry, theme and layout resolution, and rendering helpers so applications can compose views consistently across modules without duplicating markup.
Architecture fit — poor as framed. The brief asks for a Laravel/PHP package assessment, but swp/templates-system-bundle is a Symfony bundle, not a Laravel package. It ships a Bundle subclass, a DependencyInjection/*Extension with compiler passes, tagged services, YAML/XML Doctrine mappings, and Symfony event subscribers. Laravel has no loader for any of that; there is no config/app.php provider handshake that makes this work. Any "integration" is a port, not an install.
What is portable is the domain model, which is genuinely the interesting part:
For a CMS or publishing product, that model is a legitimate build-vs-buy answer to "let editors change layout without a release." For a generic Laravel app, it is over-engineered.
Integration feasibility — low on Laravel, conditional on Symfony. The 2018-06-08 release date pins the dependency graph to roughly Symfony 3.4/4.x, Twig 1.x/2.x, PHP 7.1–7.2, and Doctrine pre-DBAL 3. Laravel 9+ requires Symfony 6/7 components; Composer will hard-conflict on symfony/framework-bundle, symfony/event-dispatcher, and twig/twig simultaneously. Even a standalone Symfony install on a current LTS is a fork-and-modernize job. Realistic paths are (1) use as a reference implementation and reimplement the model in Eloquent + Twig, (2) run it as an isolated sidecar Symfony service behind HTTP, or (3) vendor/fork and carry the upgrade burden.
Technical risk — high, concentrated in abandonment. Zero stars, zero dependents, last release seven years ago. There is no community to surface bugs, no security backports, and no evidence of production use outside Superdesk Web Publisher itself. Database-stored Twig templates are also a stored-XSS surface — editor-supplied template source executes with full Twig capability unless the sandbox extension is configured correctly, and Twig 3 changed escaping and deprecation semantics. That is a security review you inherit, not one you can defer upstream.
Key questions:
views table, at materially lower cost?Stack fit. Good only inside a Symfony 3.4/4.x application already using SWP components (swp/bridge-bundle, multi-tenancy). Poor-to-unusable in Laravel. Twig itself is fine in Laravel via twigbridge, but this bundle's DB-backed loader collides with Laravel's ViewFinderInterface — you would be replacing the view resolution layer, not extending it.
Options, costed:
| Option | Effort | Verdict |
|---|---|---|
composer require into Laravel |
n/a | Not possible; dependency conflict |
| Sidecar Symfony service, HTTP render API | 2–3 sprints + ongoing ops | Viable if publishing is a core domain |
| Port model to Eloquent + Twig/Blade | 6–10 sprints | Best long-term fit for Laravel |
| Fork and modernize to Symfony 6/7 | 4–8 sprints, then permanent ownership | Only if Symfony-native |
| Reference-only, build a thin equivalent | 3–5 sprints | Recommended default |
Migration path (if proceeding). Extract the schema first — templates, containers, widgets, template_assignments are stable and worth copying verbatim, including the ordering and TTL columns. Then reimplement the service layer behind your own interfaces (TemplateResolver, ContainerRenderer, WidgetRenderer) so the SWP code is a reference, not a dependency. Keep Twig as the renderer; do not adopt the bundle's cache layer — you will want Laravel's cache and queue primitives instead. If tenancy matters, model it explicitly from day one; retrofitting tenancy into a container tree is the single most expensive mistake here.
Compatibility. Assume PHP 8.x incompatibility until proven otherwise (nullable/return type declarations, removed Twig_* class names, DBAL 3 API changes). Budget a spike to run the test suite on PHP 8.2 as a go/no-go gate before any commitment.
Sequencing. (1) One-week spike: install in a scratch Symfony app, run tests on modern PHP, confirm blast radius. (2) Schema extraction and interface design. (3) Renderer implementation behind feature flag. (4) Tenancy and cache. (5) Side-by-side shadow render against current templates. (6) Cutover per route, not per release.
Maintenance. You become the maintainer. There is no upstream release cadence, no issue triage, and a bus factor of effectively one organization whose own activity is unclear. Every Twig or Doctrine CVE becomes your incident. For a fork, assume 10–15% of one engineer permanently.
Support. No community, no docs beyond the repository, no Stack Overflow corpus. Onboarding relies on reading source. This is the dominant hidden cost.
Scaling. Database-backed templates mean a cache miss is a DB read on the hot render path; without a shared cache you get per-node compile churn and inconsistent invalidation across instances. Container/widget rendering is the classic N+1: a page with 12 widgets across 4 containers is 16 template lookups unless you batch-load the tree. Cache invalidation must be explicit and event-driven — editor saves a template, every node must drop it.
Failure modes to design against:
Ramp-up. A Symfony-comfortable mid-level developer: 2–4 weeks to productivity, longer to be safe with the sandbox and caching. A Laravel-only team: 6–10 weeks if porting, effectively indefinite if trying to operate the bundle as-is.
Recommendation. Do not adopt as a dependency. Score 0 with zero dependents and a seven-year gap is a fair signal, and the Symfony/Laravel mismatch makes the integration cost dominate the value. The container/widget/assignment model is worth stealing; the package is not worth carrying. If the runtime-editable-layout requirement is real, budget a focused build against the extracted schema. If it is not real, close this out.
How can I help you explore Laravel packages today?