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
Eu Cookie Law Bundle

Eu Cookie Law Bundle Laravel Package

leblanc-simon/eu-cookie-law-bundle

A Symfony bundle for EU cookie law compliance, providing a configurable consent banner and blocking cookies until visitors agree. It helps sites meet GDPR-style requirements with minimal setup and easy integration into existing Twig templates.

View on GitHub
Deep Wiki
Context7

A simple bundle for Symfony to add the text for EU Cookie Law

Frequently asked questions about Eu Cookie Law Bundle
Is leblanc-simon/eu-cookie-law-bundle compatible with Laravel?
No. It is a Symfony bundle (type symfony-bundle) that relies on Symfony's DependencyInjection Extension and Twig view conventions, and it ships no Illuminate\Support\ServiceProvider for Laravel auto-discovery. Composer may resolve it, but nothing registers at runtime in a Laravel kernel. Treat it as a reference implementation only.
How do I install leblanc-simon/eu-cookie-law-bundle in a Laravel application?
composer require may succeed, but installation does not equal integration. Laravel's package discovery looks for service providers and publishable config and views, neither of which this bundle provides. The practical route is to copy the markup, CSS, and JS out of the bundle's Resources/views and Resources/public directories and re-home them as a Blade component or @include. That is a port, not an integration.
Does this bundle actually block cookies until visitors consent?
Based on its description, it is a notice or explanation banner, not a consent management platform. It likely provides no script gating, consent state, category controls, or audit trail. Under ePrivacy Art. 5(3) and GDPR, non-essential cookies need opt-in before scripts run. If you need blocking and evidence, use a maintained CMP or build a gating middleware.
Which Laravel and PHP versions support this package?
None are officially supported for Laravel. The bundle targets Symfony, and its composer.json likely pins symfony/framework-bundle and PHP constraints from the Symfony era it was built for. On Laravel 9 to 11 with PHP 8.1 and newer, those constraints can conflict with modern Symfony components Laravel already installs. Expect resolver conflicts or forced downgrades.
How do I convert the Symfony Twig cookie banner to a Laravel Blade component?
Extract the template from the bundle's Resources/views directory and move it into resources/views/components/cookie-notice.blade.php. Replace Twig tags with Blade directives, move text and policy URL into a config/cookie-notice.php file, and register the component with php artisan make:component or a manual class. Load CSS and JS through Vite rather than Symfony's assets:install. Render it with x-cookie-notice in your layout.
Is this bundle GDPR and CNIL compliant?
A passive explanation div is a notice, not consent. CNIL guidance rejects implied consent such as 'by continuing to browse you accept' and requires a refuse option as easy as accept, purpose-scoped choices, consent evidence, and easy withdrawal. This bundle likely provides none of those. Have counsel or a DPO review before relying on it for compliance.
Can I use this bundle with Laravel Vite instead of Symfony's assets:install?
Not directly. The bundle assumes Symfony's Resources/public and assets:install workflow, which has no equivalent in Laravel's public plus Vite pipeline. The workable approach is to copy the static CSS and JS into resources and import it from your app.js or app.css. Then run npm run build. Do not expect the bundle's asset commands to work in Laravel.
What are the Laravel alternatives to this Symfony cookie bundle?
Options include maintained CMPs such as OneTrust, Cookiebot, or Osano, which handle consent state, categories, and audit trails. Laravel-native packages exist for cookie banners and consent logging, though you should verify maintenance and Laravel version support. For small sites, a first-party Blade component, a consent middleware, and a consent_log table is often sufficient. Avoid adopting an unmaintained Symfony bundle for a compliance requirement.
Is leblanc-simon/eu-cookie-law-bundle maintained, and are there dependency risks?
It appears to be an older, low-activity Symfony bundle with a small footprint and an MIT license. Low activity is not a security risk by itself for a static banner, but stale Symfony and PHP constraints can break Composer resolution in modern Laravel projects. Check the last release date and run composer why-not before committing. If you only need the markup, vendor it with attribution.
How do I test that non-essential scripts are blocked until consent in Laravel?
Add a middleware or tag-manager service that checks a consent cookie or database record before rendering analytics, marketing, or third-party tags. In tests, assert that the script tag is absent from the response when consent is missing and present after a recorded opt-in. Use Laravel's HTTP tests with assertDontSee and assertSee, and cover withdrawal by clearing consent and re-asserting absence. Also verify the banner offers accept and refuse with equal prominence.
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