mmoreram/http-headers-bundle
A Symfony bundle by Marc Morera for managing HTTP response headers through configuration and annotations, letting you define cache, security, and custom headers declaratively instead of setting them manually in every controller.
kernel.response event listener in Symfony, or a single middleware in Laravel. This package is the "buy" option, and the buy option here is a 2015-era Symfony 2 bundle with 8 stars, 0 dependents, and no release in roughly a decade. The decision it most cleanly supports is build: replicate the pattern, not the dependency.X-Frame-Options, X-Content-Type-Options, Referrer-Policy, or a CSP rollout, header handling is a security-critical path. A package last released in 2015 cannot be relied on for PHP 8 compatibility, Symfony 5/6/7 support, or CVE responsiveness. Route this to either a maintained equivalent (e.g., nelmio/security-bundle for the security subset) or first-party code.Adoption criteria are narrow and mostly historical:
Look elsewhere — or build in-house — when:
For executives: We evaluated this package and recommend against adopting it. It is unmaintained — last release November 2015 — has negligible community adoption (8 stars, zero dependent projects), and is a Symfony-only component that does not apply to our Laravel stack. The capability it provides, attaching custom HTTP headers to responses, is small and well-understood: we can implement it ourselves in under a day and own it outright. Adopting this instead would create a permanent maintenance and security liability in exchange for saving a few hours of work. The recommendation is a no-go, with first-party implementation as the path forward.
For engineering: The idea is worth keeping — declarative, per-environment header definitions applied centrally to all responses is a clean pattern for security headers, cache policy, and tracing IDs. The artifact is not: Symfony 2-era bundle, no PHP 8 or modern Symfony support, no maintainer, no dependents. Implement it as a kernel.response listener (Symfony) or middleware (Laravel), driven by config, with a test asserting the exact header set on a sample response. If you need the standard security header set specifically, evaluate nelmio/security-bundle as the maintained alternative rather than hand-rolling CSP. If any legacy service already depends on this bundle, treat it as technical debt and schedule replacement alongside the next framework upgrade rather than as standalone work.
How can I help you explore Laravel packages today?