nyrodev/php-template-bundle
A Symfony bundle by nyrodev that adds PHP-based templating support to your application, with helpers and utilities for rendering views directly in PHP instead of relying on a separate template engine. Lightweight, simple to configure, and easy to drop into existing Symfony projects.
Architecture fit — poor, and the premise needs correcting. Despite being filed as a "Laravel/PHP package," nyrodev/php-template-bundle is a Symfony bundle, not a Laravel package. It integrates through Symfony's Kernel bundle registration, a DI Extension with a Configuration tree, and — most likely — the symfony/templating component's PhpEngine and template-guessing machinery. Laravel has no equivalent seam: its view layer is Illuminate\View with EngineResolver, FileViewFinder, and Blade. There is no adapter, service provider, or extra.laravel block here, so Composer autodiscovery will do nothing useful. For a Laravel codebase, architecture fit is effectively zero.
Integration feasibility — not feasible as-is; feasible as a pattern reference. To make this run under Laravel you would have to reimplement its behavior rather than install it. The good news is that the underlying concept is genuinely small: Laravel's View facade exposes View::addExtension('php', 'php') and an EngineResolver, so a plain-PHP engine is roughly one class implementing EngineInterface (extract() + ob_start() + include). That is a 1–2 day spike, versus an unbounded effort to port a Symfony bundle. Net: the bundle's idea is integrable; the artifact is not.
Technical risk — high.
symfony/http-foundation, console, finder, process, etc. Pinning an old symfony/templating alongside them is a likely dependency-solver dead end, and an unavoidable one if we also want security patches elsewhere in the tree.{{ }}, PHP templates do not auto-escape. Any template authored by a non-engineer or (worse) stored in the database is a direct RCE vector.Key questions for the maintainer/team:
symfony/templating?.php templates during migration," or "avoid Blade"? Those have very different answers.Stack fit. If the stack is Laravel: do not install this bundle. Treat it as a specification for a ~100-line custom EngineInterface registered via View::addExtension('php', 'php'), giving you view('legacy.report', $data) alongside Blade. If the stack is genuinely Symfony 4.4 LTS with a hard legacy-template requirement, the bundle is a defensible pin — but only inside that frozen boundary.
Migration path. For a Laravel target, the pragmatic sequence is: (1) spike the custom engine resolver, (2) render the existing PHP templates unmodified through it, (3) migrate high-churn views to Blade first, (4) delete the engine when the count hits zero. This keeps legacy views working without importing a Symfony bundle's lifecycle into a Laravel app.
Compatibility. Verify a composer why-not solve before any design work — that single command either kills or greenlights the idea in minutes. Check the Laravel↔Symfony component matrix, PHP ^8.x support, and whether the bundle's DI extension does anything at boot that assumes a Symfony container (it will).
Sequencing. Timebox a 1–2 day spike. Decision gate: if the composer solve conflicts, or if the engine cannot be exercised in under a day, stop and build in-house. Do not let this become a fork-maintenance commitment; the fork is the expensive outcome, not the integration.
Maintenance — the dominant cost. Bus factor of one, zero dependents, no downstream users surfacing bugs. Adopting means we own the fork the moment the maintainer stops responding — and there is no evidence of active maintenance to rely on. Budget for vendoring or a hard fork from day one, or don't start.
Support. No vendor, no community. Issues are answered by whoever wrote the bundle, if at all. Internal ownership must be assigned explicitly; "the team owns it" is not an owner.
Scaling. Genuinely fine, and the one unambiguously positive note. PHP include-based rendering is Opcache-friendly and compiles to the same class of output Blade produces. Rendering throughput will not be the constraint; correctness, escaping, and maintainability will be.
Failure modes to plan for:
composer update breaks the solve and blocks security patching across the app.e() wrapper is needed.Ramp-up. Low for engineers fluent in raw PHP templates; higher than it looks for everyone else. The team surrenders Blade's components, slots, directives, and auto-escaping, and documentation here is thin enough that institutional knowledge lives in one or two heads. Onboarding new engineers to a bespoke template layer is a recurring tax, not a one-time cost.
Recommendation. Do not adopt. The 0.01 score and zero dependents are accurate, not unlucky. If the requirement is real, implement the equivalent engine natively against Illuminate\View in a timeboxed spike — you get the same rendering behavior, full control of escaping, no Symfony coupling, and no fork obligation.
How can I help you explore Laravel packages today?