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

Cookie Consent Bundle Laravel Package

fairlane/cookie-consent-bundle

A Symfony bundle for adding cookie consent to your site, giving you a simple way to present consent options and manage cookie permissions. Useful for GDPR-style compliance, though it's a small, low-activity package best reviewed before relying on it in production. Check the source for supported feat...

View on GitHub
Deep Wiki
Context7

fairlane/cookie-consent-bundle is a Symfony bundle for adding GDPR-compliant cookie consent to your application. It provides the server-side plumbing for declaring cookie categories, rendering a consent banner, and recording visitor choices so that non-essential cookies are only loaded after explicit approval.

Configuration is handled through bundle config, letting you define cookie groups and their scripts without touching controller logic. Templates are Twig-friendly and easy to restyle to match your frontend.

  • Configurable cookie categories (necessary, analytics, marketing)
  • Consent persistence across requests
  • Twig template integration for banner rendering
  • Conditional script loading based on stored consent
  • Lightweight, no external service dependency
Frequently asked questions about Cookie Consent Bundle
Can I install fairlane/cookie-consent-bundle in Laravel?
No. It is a Symfony Bundle built for Symfony's HttpKernel bundle registration, service container, EventDispatcher, and Twig loader. Laravel does not provide that bundle system, so nothing auto-wires; installing it would require a port into a ServiceProvider, Blade views, and middleware. The technical assessment rates Laravel integration feasibility as low.
Does fairlane/cookie-consent-bundle support Laravel 10, 11, or 12?
No. The last release was 2017-11-11 for Symfony 3-era applications, and modern Laravel 10/11/12 requires PHP 8.1+ with Symfony 6/7 components. Composer will likely fail on PHP/Symfony platform constraints, and even with --ignore-platform-reqs the bundle cannot boot in Laravel. Treat it as incompatible.
Is fairlane/cookie-consent-bundle still maintained?
No. The package shows 2 stars, 0 dependents, and a package score of 0.07, with its last release in November 2017. There is no named maintainer or security contact in the assessment, and it is effectively orphaned. Unmaintained dependencies can also trigger abandoned-package flags in composer audit and Dependabot.
What does this Symfony cookie consent bundle actually do?
It is intended as a GDPR-ready cookie consent bundle for Symfony 3 applications, offering a customizable consent banner, per-category preference controls, and persistent consent records. However, it is Symfony-specific and does not provide Laravel service providers, Blade views, or Laravel middleware. Its 2017 vintage predates GDPR enforcement and later guidance such as IAB TCF v2.x and Google Consent Mode v2.
Can I use this bundle as a reference for a Laravel GDPR cookie consent implementation?
Yes, but only as a reference. You can harvest design decisions such as its consent-category taxonomy, cookie naming conventions, and configuration-tree shape. Do not try to shim Symfony's dependency injection into Laravel; reimplement the consent model with native Laravel middleware, Blade views, and a consent-ledger table.
What Laravel cookie consent packages should I use instead?
For a self-hosted Laravel build, consider spatie/laravel-cookie-consent or whitecube/laravel-cookie-consent for the banner and middleware layer, paired with a custom consent-ledger table and script-gating mechanism. If you need TCF v2.2 strings, consent-mode signals, geo-detection, and vendor audit reports, a commercial CMP such as Cookiebot, OneTrust, Usercentrics, or Osano is the lower-maintenance route.
Does this bundle meet GDPR demonstrable consent requirements?
The assessment says that is unlikely without additional work. A 2017 bundle probably stores consent in a client cookie only, without a server-side ledger, timestamp, user identifier, policy version, or revocation flow. GDPR Article 7(1) requires demonstrable consent, and ePrivacy Article 5(3) requires prior consent before non-essential storage, so you must verify and likely rebuild these controls.
What PHP and Symfony versions does fairlane/cookie-consent-bundle require?
The package targets Symfony 3, so expect constraints around PHP 5.6/7.0-7.1 and Symfony 2.8/3.x. The assessment advises checking composer.json first because those constraints will conflict with PHP 8.1+ and Symfony 6/7 components used by modern Laravel. It will not install cleanly in a current Laravel project.
Does the bundle actually block cookies and scripts before consent?
The assessment flags this as a key unknown and a likely compliance gap. Many older consent bundles render a banner but do not actually gate non-essential scripts before consent; you must determine whether blocking happens through template gating, a JavaScript shim, or a tag manager. ePrivacy requires prior consent before non-essential cookies or storage, so banner-only behavior is not sufficient.
Is it safe to use an abandoned Symfony bundle for production cookie consent?
No, it is high risk for production consent management. The package is abandoned, has no CVE disclosure path, and sits on a legally binding compliance surface where audit trails and revocation matter. Use it only as a reference implementation, or keep it in a legacy Symfony app behind a feature flag while planning replacement.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect