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

Http Headers Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — Poor to none. mmoreram/http-headers-bundle is a Symfony bundle, not a Laravel package. It assumes Symfony's bundle contract: registration in AppKernel/bundles.php, a DependencyInjection\Extension with a configuration tree, and response mutation via a kernel.response event listener. Laravel has no bundle concept, no event listener registration of that shape, and no configuration-tree compilation step. Making it run inside a Laravel app would mean pulling Symfony's HttpKernel into the dependency graph and building an adapter — more code, and more fragile code, than the capability is worth. The capability itself (set N response headers from config) is a first-party Laravel concern: $response->headers->set($name, $value) inside a middleware.

Integration feasibility — The feature is trivial to deliver; the artifact is not. Config-driven header sets map cleanly onto config/http_headers.php plus a global middleware, with per-route or per-environment variation handled by middleware groups. There is no scenario where importing this package beats writing ~30 lines in the host framework, and the import path also drags in an unmaintained Symfony 2.x-era codebase.

Technical risk — High, and concentrated in exactly the wrong place. Last release 2015-11-18, 8 stars, 0 dependents, score 0.07. That profile means: no maintainer triage, no PHP 7/8 compatibility work, no Symfony 3/4/5/6 support, and composer constraints that will almost certainly conflict with a modern dependency tree. Zero dependents means there is no production validation to borrow and no fork ecosystem to fall back on. The code path it occupies — the outbound response — is where CSP, HSTS, X-Frame-Options, and X-Content-Type-Options live. Shipping an unpatched, unreviewed library there is a security review finding waiting to be written.

Key questions

  • Is there an actual Symfony application in scope, or is this being evaluated against a Laravel/PHP estate where it simply does not apply?
  • Who owns header policy — platform/security or the application team — and is enforcement expected at the app or the edge (nginx/ingress/CDN)?
  • Are headers static per deployment, or do they vary by route, tenant, or environment?
  • Are headers currently set by the web server already, creating a duplicate/conflict risk if the app also sets them?
  • What is the acceptance criteria — which response classes (HTML, JSON, redirect, error, streamed, file download) must be asserted in tests?

Integration Approach

Stack fit — For Laravel: do not install; reimplement as middleware. For a legacy Symfony 2.x app: the bundle may still function, but a 20-line kernel.response listener in the app is preferable to an abandoned third-party dependency.

Migration path — Treat the bundle only as a specification source. Extract the intent from its YAML/XML config — header names, values, environment scoping, exemptions — into a plain PHP config array. Implement a middleware that iterates that config and applies headers to the outgoing response, with an explicit allowlist so application code can still override where needed.

Compatibility — If retained on Symfony, pin it, verify against the exact Symfony LTS and PHP version in use, and be prepared to vendor and patch. On Laravel the compatibility surface collapses to the framework's middleware API, which has been stable across 8–11, so the reimplementation carries near-zero upgrade cost.

Sequencing

  1. Inventory required headers, their owners, and their sources (edge vs app) — resolve duplication before writing code.
  2. Decide enforcement point: static security headers at the edge, dynamic/route-specific headers in middleware.
  3. Implement config + middleware; register globally with deliberate ordering relative to session/auth and any response-caching layer.
  4. Test every response class: HTML, JSON, redirects, framework error pages, streamed and binary responses.
  5. Add a CI assertion (e.g. assertHeader) so a future refactor cannot silently drop headers.
  6. Record the decision to not adopt the bundle, with the abandonment evidence, so it is not re-litigated next quarter.

Operational Impact

Maintenance — Abandoned package means you are the maintainer from day one: the fork, the PHP-version upgrade, the security review, the CVE triage that never arrives upstream. In-house middleware keeps the maintenance cost near zero and inside the team's existing competence.

Support — No upstream support, no issue activity, no dependents, therefore no StackOverflow corpus and no community forks to crib from. Every problem is a first-principles problem.

Scaling — Header injection is O(1) per response; compute cost is irrelevant. The real scaling risk is caching: headers set in-app can be stripped by a proxy, or cached and served stale across routes, tenants, or deploys. Static security headers belong at the edge for this reason.

Failure modes

  • Silent absence: middleware not registered, config not cached after deploy, or a response path that bypasses middleware (streamed/binary responses, early exceptions rendered by the framework handler, long-lived workers under Octane holding stale config).
  • Duplicate or conflicting headers when both the edge and the app set the same name — last-write-wins, with no error.
  • Weakening security posture by overriding a strong upstream header (HSTS, CSP) with a weaker app-level value.
  • Unbounded header growth as teams append entries without an owner or review.

Ramp-up — In-house middleware is roughly an hour for any Laravel developer and is immediately legible in review. Ramping a Laravel team on Symfony bundle DI extensions and configuration-tree semantics is a day or more, produces nothing reusable, and leaves the team owning code none of them wrote.

Bottom line — Do not adopt. Score 0.07 with zero dependents and an eleven-year-old release is a correct signal here: the package is both abandoned and architecturally mismatched to the stated stack. Capture its config as a requirements document, implement the behavior natively, and move on.

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