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

Symfony Cookie Consent Bundle Laravel Package

fatalnetwork/symfony-cookie-consent-bundle

A Symfony bundle for adding cookie consent to your application, with configurable consent banners and cookie handling. Integrates consent management into Symfony projects so visitors can accept or reject cookies.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a full-stack Symfony bundle, not a Laravel package — and the distinction is structural, not cosmetic. Laravel consumes Symfony components (HttpFoundation, Console, Finder, Routing) but does not implement the Symfony bundle contract: there is no Kernel::registerBundles(), no config/bundles.php, no bundle DependencyInjection/Extension class being auto-discovered, no autowired service container driven by Symfony's compiler passes. A cookie-consent bundle typically ships four things — a DI extension with a configuration tree, Twig templates and a Twig extension, an event subscriber for injecting the banner into responses, and a persistence layer for consent records. Under Laravel, three of those four have no loader. Integration is therefore a port, not an install: service definitions must be re-expressed as a ServiceProvider with mergeConfigFrom/publishes, Twig templates as Blade components, the response subscriber as middleware or a view composer.

Integration feasibility. Low as a dependency; moderate as a reference implementation. The runtime value of a consent banner is genuinely small surface area — banner render, category selection, consent persistence, and gating of third-party tags. That is perhaps a few hundred lines. The cost of adopting an unmaintained third-party bundle to avoid writing those lines is a poor trade, especially since the gating logic is where all the legal risk lives and where you will need to customize anyway.

Technical risk. High, and concentrated in provenance rather than code. One star, zero dependents, single maintainer, no community vetting, no security disclosure channel, and a composite score of 0.125 — these are abandonment signals, not merely adoption signals. The 35.35 opportunity score is the interesting number: it says the problem is valuable while the artifact is not. Additional risks: unknown PHP/Symfony version constraints (likely stale against PHP 8.3 / Symfony 6–7), no visible test suite, and unverifiable GDPR/AVG claims. A package that asserts compliance without an audit trail — consent versioning, timestamps, revocation, purpose granularity, IP/user binding — creates liability rather than reducing it.

Key questions.

  • Does it implement prior blocking (tags suppressed until consent), or merely display a banner? Banner-only is not compliant under GDPR/ePrivacy in most readings.
  • Does it persist an auditable consent record with version, timestamp, categories, and revocation path?
  • Are consent categories granular and configurable, or hardcoded to a fixed set?
  • What are its composer.json constraints, and does it pass on current PHP?
  • Is there any server-side enforcement, or is everything client-side and therefore trivially bypassable?
  • What is the actual LOC and test coverage — i.e., how much would a clean-room reimplementation cost?

Integration Approach

Stack fit. Poor. There is no supported path from a Symfony bundle into a Laravel application without either (a) installing the full Symfony framework kernel alongside Laravel, which is indefensible, or (b) manually translating every artifact. Neither is a "integration"; both are a rewrite with extra steps.

Recommended path — three options, ranked.

  1. Buy/adopt native. A maintained Laravel package (spatie/laravel-cookie-consent, whitecube/laravel-cookie-consent) or a hosted CMP (Cookiebot, Osano, Klaro) covers banner, categories, and script gating with an actual support contract. Preferred for anything customer-facing.
  2. Build first-party from this as a spec. Read the source, extract the consent data model and category taxonomy, discard the Symfony plumbing. Ship a small internal package: config file, migration for a consents table, Blade component for the banner, middleware or view composer for injection, and a @consent('analytics') Blade directive for gating. Roughly one sprint, fully owned.
  3. Use as-is in Symfony apps only. Viable if your portfolio is polyglot and you have Symfony services, but the maintenance risk travels with it.

Migration path. Treat the repository as documentation. Extract: category names, the consent payload shape, the cookie/localStorage keys, and the banner UX. Do not extract the DI wiring, the Twig extension, or the subscriber — none of them survive translation.

Compatibility. Verify composer.json before anything else. Expect Symfony 3/4-era constraints and PHP 7.x. Any forced downgrade to accommodate it is disqualifying.

Sequencing.

  1. Source audit (half a day) — answer the key questions above.
  2. Legal/compliance review of your actual cookie inventory against the category taxonomy; this gates everything.
  3. Build-vs-buy decision memo with the audit as evidence.
  4. If building: data model and migration first, then gating helper, then banner UI.
  5. Instrumentation and consent-record verification before rollout.

Operational Impact

Maintenance. If you fork or vendor, you own it permanently — no upstream to rebase against, because upstream is dormant. Budget for a named owner; consent code drifts as regulations and your tag inventory change, and a stale banner is a compliance finding, not a cosmetic bug.

Support. Effectively none. No documentation beyond the README, no issue-tracker throughput, no Stack Overflow corpus. Every question becomes internal engineering time, which erodes the nominal benefit of using a package at all.

Scaling. Runtime cost of a banner is negligible; the scaling risks are architectural. Avoid per-request database reads for consent state — resolve once per session and cache. If gating happens at the edge or behind a CDN, consent decisions must be reachable from the rendering layer, not assumed from a server session. Watch for middleware ordering conflicts if the injection mechanism is a response subscriber analog.

Failure modes. Ranked by business impact:

  • Banner fails to render (asset, JS error, template regression) → active non-compliance with no visible symptom.
  • Consent not persisted (cookie domain, SameSite, localStorage scoping) → repeated prompts, measurable conversion drop.
  • Over-blocking → analytics and marketing tags silently suppressed; revenue attribution and funnel data quietly wrong for weeks.
  • Under-blocking → regulatory exposure and the exact risk the package was bought to prevent.
  • Silent client-side bypass → consent gating that only exists in the browser provides no defensible audit position.

Ramp-up. Engineering ramp is genuinely low — the codebase is small and readable, and a competent Laravel engineer can absorb the model in a day. The expensive ramp is legal and cross-functional: privacy counsel, marketing/analytics tag owners, and whoever owns the consent record retention policy all need to sign off on the taxonomy before a line of production code lands. That coordination cost dominates, and it is identical whether you build or buy — which further weakens the case for adopting a fragile dependency.

TPM recommendation. Do not take a production dependency on this package in a Laravel context. Use it as a design reference, extract the consent model, and either adopt a maintained Laravel-native package or build a small first-party implementation you can audit. The repository is a useful artifact for a problem you must solve; it is not a solution you can rely 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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console