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

Cookie Consent Bundle Laravel Package

indigophp/cookie-consent-bundle

Symfony bundle for GDPR-friendly cookie consent. It shows a customizable consent banner, lets visitors accept or reject cookie categories, and stores their choices so analytics, tracking, and other scripts load only after permission is granted.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — the primary blocker is a stack mismatch, not a code-quality issue. This is a Symfony Bundle: it registers through AppKernel::registerBundles(), auto-loads a DI Extension with a configuration tree, and renders through Twig. Laravel has no equivalent bundle lifecycle, no Extension auto-discovery, and typically no Twig. The only genuinely portable artifacts are the front-end Cookie Consent JS/CSS assets and the default consent configuration array — the PHP integration layer is dead weight in a Laravel codebase. A TPM should record this as "not installable as-is" rather than "needs configuration," because the distinction changes the effort estimate from hours to days and the sourcing decision from adopt to borrow.

Integration feasibility — low, and what remains is a build, not an integration. There is no facade, no middleware, no Artisan command, no Blade view, no vendor:publish tag, and no Laravel package discovery. The realistic path is: copy the JS/CSS out of Resources/, write a config file, write a Blade component, wire a small service provider, and remove the Composer requirement. That is roughly 50–150 lines of our own code plus asset handling. The TPM framing that matters: the package's contribution to our deliverable is a reference design and a bundled JS payload, not a dependency.

Technical risk — high, on three independent axes.

  • Abandonment risk. The repository is archived. No security patches, no PHP 8.x or Laravel 10/11 compatibility work, and no responsiveness to upstream changes in the Cookie Consent plugin itself. Composer constraints are almost certainly Symfony 2/3-era, which means resolution conflicts or --ignore-platform-reqs hacks that our CI should reject.
  • Compliance risk (the deciding factor). This wraps a front-end notice banner, not a consent management platform. GDPR/ePrivacy for EU/UK traffic requires prior opt-in for non-essential cookies, granular per-category control, consent records for accountability, and revocation. A banner that displays a notice — particularly one leaning on implied or continued-browsing consent — does not satisfy that. The legal exposure is materially larger than the engineering exposure, and it is the risk a TPM is actually accountable for surfacing.
  • Ecosystem signal risk. 15 stars, 0 dependents, score 0.47, archived. There is no production evidence, no issue corpus to mine, and no community to escalate to. The 3.95 "opportunity" score should be read as a gap in the problem space (everyone needs cookie consent), not as validation of this artifact.

Key questions to resolve before any further evaluation — these are the TPM's triage list:

  • What does our actual obligation require: a visual notice, or a blocking, logged, revocable consent gate? This single answer likely rejects the package outright.
  • Which jurisdictions and what traffic share? EU/UK/EEA plus California changes the requirement set substantially.
  • Is there a named legal/privacy owner who must sign off on the mechanism and its records?
  • Do we need tag gating — blocking GA4, Meta, LinkedIn, Hotjar before opt-in — and Google Consent Mode v2 for ad measurement? If EU paid media is on the roadmap, this is the requirement that drives revenue and it is entirely out of scope here.
  • Is the Silktide Cookie Consent v3-style UX still what we want in 2025, or are we inheriting a deprecated interaction pattern?
  • Are we prepared to own a vendored, forked JS asset permanently, with no upstream?

Recommendation for the decision log: reject as a dependency; retain as reference source. If we want this UX, vendor the JS and reimplement the wrapper natively.

Integration Approach

Stack fit — none at the package level. A Laravel 10/11 app on PHP 8.2+ against a Symfony 2/3-era bundle is a double version skew: framework and runtime. Even a hypothetical bundle shim would drag symfony/framework-bundle internals and a Twig runtime dependency into our lockfile for the sake of rendering two <div>s and a script tag. That is negative value in a Laravel container.

Migration path — extract, do not install. The sequence a TPM should put in the ticket:

  1. Read the repo's Resources/ directory and copy the JS/CSS into resources/vendor/cookie-consent/ (or a small internal Vite entry, which is the better long-term home).
  2. Port the default config array into config/cookie-consent.php with env-driven overrides — COOKIE_CONSENT_ENABLED, policy URL, category definitions, theme.
  3. Build a Blade component (<x-cookie-consent />) rendered from a layout partial or view composer, gated by config so non-production environments suppress it.
  4. Register a minimal CookieConsentServiceProvider for config merge and asset registration. Skip the container bindings, events, and Twig entirely.
  5. Remove the Composer requirement. Never carry a transitive Symfony dependency for a banner.

Compatibility checks to run if anyone insists on installing: composer why-not indigophp/cookie-consent-bundle and composer show --all to surface PHP/Symfony constraints; confirm the bundle class registers through a mechanism Laravel's PackageManifest ignores (it will, so zero functionality arrives automatically); and check whether twig/twig is a hard requirement, since that puts an unused template engine in our production lockfile.

Sequencing — compliance first, UI last. This ordering is the most valuable thing the TPM produces, because it reframes the package as a late-stage cosmetic decision rather than an early-stage architecture one:

  1. Requirement definition (Legal/Privacy + TPM): jurisdictions, categories, opt-in versus notice, retention of consent records. Gate: written requirement.
  2. Tool selection: maintained CMP (Cookiebot, Osano, Usercentrics, OneTrust) versus MIT OSS JS (orestbida/vanilla-cookieconsent, Klaro!) versus in-house. Be explicit that spatie/laravel-cookie-consent only hides cookies until a banner is accepted — it is not a CMP and does not solve EU prior-consent or logging.
  3. Script inventory: enumerate every tag manager, analytics tag, pixel, chat widget, and third-party embed; classify each as necessary / functional / analytics / marketing. This is the real work and it is independent of which banner library wins.
  4. Blocking implementation: gate non-essential scripts server-side (Blade directives) and client-side (consent state checked before injection). A banner without blocking is theater and creates false assurance in status reporting.
  5. Consent state and logging: cookie/localStorage for the session, plus a server-side consent record (timestamp, policy version, categories granted, session/IP hash) if Legal requires auditability.
  6. Banner UI: last, and at this point the bundle's JS is one candidate among several on equal footing.
  7. Revocation surface: persistent "Cookie settings" link that reopens the preference center.

Steps 1–5 dominate the effort; the package's contribution to the critical path rounds to zero. That is the core finding to communicate upward.

Operational Impact

Maintenance — unacceptable as a standing dependency. An archived repository is unmaintained by definition: no CVE patching, no compatibility release for the next Laravel or PHP major, no one to ask when behavior breaks. Every future framework upgrade becomes a forensic exercise in code we cannot fix from upstream. Owning the extracted JS/CSS is strictly better — it at least lives in our repo, under our CI, subject to our review process and our security scanning.

Support — none. No vendor, no SLA, no maintainer responsiveness. Internal support burden lands on whoever performed the extraction; if that is one engineer and it is undocumented, we have a single point of failure for a compliance-relevant surface. With 15 stars and 0 dependents there is also no community corpus — no Stack Overflow answers, no issue history worth mining — so every troubleshooting session starts from zero.

Scaling — low technical ceiling, high process ceiling.

  • Traffic: a static JS banner scales trivially. The only server-side cost is consent logging, which is a write on every consent event; volume is likely low, but plan the retention job and the schema up front rather than retrofitting.
  • Scope: the real scaling limit is regulatory and organizational. Adding a jurisdiction, a language, a cookie category, or a new third-party script means touching the banner config, the blocking logic, and possibly the consent record schema. Budget for this quarterly, not once — and reflect it in the roadmap as an ongoing platform cost rather than a closed v1 deliverable.
  • Multi-surface: a mobile app, AMP pages, or a second web property cannot reuse this integration. A CMP with a unified API could; this will not. If the org has more than one digital surface, that gap will surface within a year.

Failure modes to design against — each needs a documented decision, not an assumption.

  • Banner fails to load (asset error, CDN miss, JS exception). Either non-essential scripts run unguarded — a compliance breach — or the page is blocked — a revenue and UX loss. Pick and document a fail-safe posture (default-deny is the legally defensible choice, and it must be tested in staging).
  • Consent state lost (cookie eviction, ITP/safari 7-day cap, localStorage clear). Users get re-prompted, which is acceptable; users silently losing a previously granted state while scripts continue to run is not. Decide whether state re-derives from server-side records.
  • Preference drift after policy change. If the policy version or category set changes and old consent tokens are honored, we are relying on consent for a policy the user never saw. Version the consent payload and re-prompt on material change.
  • Silent regression in blocking logic. A refactor moves a script tag above the consent gate and no test catches it. Add a CI check or smoke test that asserts known third-party tags are absent from the pre-consent DOM.

Ramp-up — small and non-transferable. A competent Laravel engineer reads the extracted partial and config in under a day; the package itself teaches nothing reusable. The institutional knowledge that does need to persist is the requirement definition, the script inventory and classification, the consent-record schema, and the fail-safe posture — none of which the package provides. Onboarding cost for a successor is effectively "read our internal doc," which is another argument for the in-house build: it forces the documentation the archived bundle lets you skip, and it converts a compliance-critical surface from an orphaned dependency into owned, reviewed, testable code.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib