nowo-tech/hot-reload-bundle
Symfony bundle that brings hot reloading to your development workflow. It automatically refreshes the browser when templates, assets, or PHP files change, so you can iterate faster and skip manual reloads. Lightweight and easy to install.
Framing correction (important for the assessment): despite the brief describing a "Laravel/PHP package," this is a Symfony bundle with no Laravel integration surface. A TPM must reset stakeholder expectations before any sizing: Laravel teams get zero value from it (Laravel has no bundle registration mechanism, and FrankenPHP hot reload would be wired manually via a Blade partial), and the real addressable audience is Symfony shops that run FrankenPHP in local/dev containers.
Architecture fit
FRANKENPHP_HOT_RELOAD and inject the FrankenPHP (Dunglas) hot-reload client asset into rendered pages. That is a Twig/asset-injection concern, well-aligned with Symfony's bundle model (DI extension + optional Twig/kernel listener).<script> tag and an env-specific template conditional from every application. That is a legitimate but low-leverage scope — one template block of toil eliminated per project.dev environment. If the bundle has no environment guard and relies solely on env-var presence, the architecture invites a production incident (see failure modes below).Integration feasibility
composer require --dev, register in config/bundles.php under the dev key, set FRANKENPHP_HOT_RELOAD in .env.dev/Docker Compose, done. Realistically a half-day including verification.>=8.1 <8.6, with mandatory Symfony 7.4 / 8.0 / 8.1 minors, while composer.json keeps a broader ^6.0 || ^7.0 || ^8.0. A broad constraint plus an explicitly tested narrow matrix means a Symfony 6.4 LTS shop may resolve successfully but is untested supported, not supported.Technical risk
src/Resources/public/build. Running a Vite dev server HMR and FrankenPHP hot reload in the same page is a plausible double-reload / conflicting-refresh scenario that must be explicitly tested, not assumed.Key questions to resolve before commitment
kernel.environment === 'dev', or does it key off the env var alone?<script src> that breaks a strict script-src policy?kernel.response filter — and does it interact badly with Turbo/HTMX partial swaps?FRANKENPHP_HOT_RELOAD is set but the FrankenPHP dev server is not the one serving the request (stale/404 asset)?composer.json?Stack fit
Migration path
composer require --dev nowo-tech/hot-reload-bundle pinned to an exact verified version (not a range) given the provenance uncertainty.dev array of config/bundles.php; never in the shared array. This is the primary blast-radius control and should be codified in the PR description, not left to reviewer vigilance.FRANKENPHP_HOT_RELOAD=1 in .env.dev (and the dev service definition), explicitly absent from .env, .env.dist, and any prod image.Compatibility and sequencing
APP_ENV=prod) → only then open a PR.Maintenance
composer.json constraint can eventually block a Symfony upgrade (composer update conflict on the dev requirement). Assign an owner to check it at each Symfony minor bump and be prepared to fork — MIT license plus a small surface makes a vendored fork the correct default contingency, not a last resort.Support
Scaling
Failure modes
| Failure | Blast radius | Detection | Mitigation |
|---|---|---|---|
| Bundle registered in shared/prod env config | Prod pages emit a dead script tag; CSP violations in browser console; possible render delay from a 404 | Prod-mode smoke test; CSP report-only telemetry | Dev-only registration + prod-absence check in the PR gate |
FRANKENPHP_HOT_RELOAD set in prod env file |
Same as above, invisible to code review | Env diff audit | Keep the var out of .env; only in .env.dev / compose dev override |
Strict CSP (script-src) with no nonce support |
Dev page silently fails to hot reload; console noise | Manual dev verification | Confirm nonce/inline handling before adoption (open question 2) |
| Vite HMR + FrankenPHP reload both active | Full-page reload loops or doubled reloads; developer distrust of the container | Manual A/B in a branch | Sequence adoption after Vite; feature-flag if both are needed |
| Docker bind-mount/inotify limits make the watcher miss changes | Reload appears broken; engineers chase the bundle instead of the mount | Reproduce on a second machine | Document inotify settings in the runbook |
| Upstream abandonment blocks a Symfony upgrade | Dev dependency conflict; composer update friction |
Dependency audit at each Symfony minor | Pin, then fork under MIT |
Ramp-up
How can I help you explore Laravel packages today?