Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Templates System Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Template — Twig source persisted in the database (body, title, type, cache TTL), rendered through a custom Twig loader rather than the filesystem.
  • Container — an ordered, addressable region holding widgets; the unit of page composition.
  • Widget — a configured instance (type, template, parameters, order) rendered into a container.
  • TemplateAssignment — binds a template to a route/target/position, giving editors control over layout without deploys.
  • Meta / Context — per-render metadata and article/route context passed into templates.

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:

  • Is the requirement "editors author layouts at runtime," or "we want Twig in Laravel"? Only the former justifies this domain model.
  • Who owns the fork, and what is the patch SLA for Twig/Doctrine CVEs?
  • Does the template sandbox get enabled, and who signs off on it?
  • Can we meet the requirement with Laravel Blade components + a views table, at materially lower cost?
  • Is there any SWP production deployment we can talk to for a reference?

Integration Approach

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.

Operational Impact

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:

  • Malformed template saved by an editor → uncaught Twig exception → 500 on every page using it. Needs per-widget try/catch with fallback and editor-facing validation.
  • Template-not-found after a bad assignment → blank regions, not errors, which is worse.
  • Cache stampede on deploy or TTL expiry across a fleet.
  • Circular container references → infinite render recursion. Enforce a depth limit.
  • DB unavailability escalates from "slow admin" to "site down" because templates live in the database.
  • Missing widget type after a code rollback → orphaned assignments that silently render nothing.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels