bkwld/laravel-pug
Adds Pug (formerly Jade) template support to Laravel. Register the .pug extension and write views with Pug's concise, indentation-based syntax—mixins, includes, and layouts included—while Laravel handles rendering and caching. Works alongside Blade templates.
What shipped: 2.5.0 is a single-line change — the phug/phug constraint was widened to permit Phug 2.x. No new APIs, no deprecations, no documented breaking changes at the laravel-pug level. The changelog contains no migration notes, no test-matrix disclosure, and no statement of which PHP/Laravel versions were validated against Phug 2.
Architecture fit: BKWLD/laravel-pug is a thin adapter, not a framework. It registers a view engine with Laravel's view finder, delegates parsing/compilation to Phug, and emits cached PHP into storage/framework/views. It has no persistence, no queue surface, no runtime services, and no meaningful cross-cutting concerns. That makes it architecturally cheap to adopt and cheap to remove — the coupling is to the template syntax, not to the package.
Integration feasibility: High. composer require plus (optionally) publishing config; views resolve as view('pages.home') against .pug files. A spike can be completed in 1–3 days on an existing Laravel app. The real gate is not integration effort, it is dependency resolution and PHP-version compatibility on the Phug 2 path.
Technical risk: The dominant risk in this release is semver signal, not code. Widening a constraint to accept a new major of a compiler dependency is, for consumers, a behavioural change even though it is additive on the package's own API. Specific concerns:
composer update on the same composer.json can resolve Phug 1.x and Phug 2.x respectively. Identical source, different compiled output. This is the highest-severity issue and is fixed only by explicit pinning.Phug\Renderer configuration. Without a published test matrix, assume nothing about parity.Key questions to take back to engineering:
Verdict: Adopt with explicit version pins. Do not let this dependency float.
Stack fit: Good for Laravel shops that already have Pug familiarity on the front end, share templates or design-system partials with a Node toolchain, or are consolidating a legacy Jade/Pug asset pipeline into server-side rendering. Poor fit for teams with no Pug exposure — the two-dialect cognitive tax (Blade and Pug) is real and permanent.
Migration path: Treat this as greenfield adoption (there is no prior assessment to reconcile).
Compatibility: The single most important action is to state the Phug major we intend to run, explicitly, in composer.json — either phug/phug: ^2.0 (deliberate opt-in to the new path) or ^1.0 (deliberate stay). Relying on the package's widened constraint to "figure it out" is the failure mode this release introduces. Commit composer.lock. Add a CI assertion on the resolved Phug version so a transitive bump cannot land unnoticed.
Sequencing:
.pug views without rendering them, so template syntax errors fail the build rather than the request.view:clear (forced, not conditional) on every release that touches the compiler or templates, then warm on each node.Maintenance: Low ongoing effort, moderate vendor risk. This is a small, single-maintainer package wrapping a community-maintained compiler, and this release's one-line changelog is a signal of light release discipline. Budget for self-directed diligence on every bump rather than expecting upstream guidance. Dependabot/Renovate should flag this package for manual review, never auto-merge.
Support: No commercial backing. Issue-tracker support only. Escalation path is: read Phug's own changelog, reproduce in a bare Phug script, then file upstream. Keep the adapter thin in our own code — no subclassing of Phug internals, no monkey-patching — so an upstream stall is a swap, not a rewrite.
Scaling: Effectively free at runtime. Compilation is one-time and cached; steady-state render cost is comparable to compiled Blade. The scaling considerations are all cold-path:
Failure modes to instrument:
composer update → rendering breaks or shifts on deploy with no source change. Mitigation: pin + CI resolution assertion.view:clear in the deploy runbook.Ramp-up: Low for Laravel developers — the view API is idiomatic and the package is small enough to read end-to-end in an afternoon. Moderate for Pug syntax itself, and there is a persistent context-switching cost for anyone moving between Blade and Pug files in the same codebase. Plan for one engineer to own the templating layer and produce a short internal style guide covering escaping, partials, and where Pug ends and Blade begins.
How can I help you explore Laravel packages today?