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 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

Technical Evaluation

Architecture fit — poor, and the mismatch is categorical. Despite the request framing this as a Laravel package, the artifact is a Symfony bundle (*-bundle suffix, Symfony's DependencyInjection/Extension + Resources/views convention, type: symfony-bundle in composer.json). Laravel does not have a bundle system; a Symfony Bundle subclass has no registration path in a Laravel kernel because symfony/framework-bundle is not a Laravel dependency (Laravel pulls only low-level Symfony components such as http-foundation, console, routing, finder). The package's rendering layer is almost certainly Twig, whereas Laravel's default is Blade, and its asset model assumes assets:install/Resources/public rather than Laravel's public/ + Vite pipeline. There is effectively zero architectural overlap with a Laravel application.

Integration feasibility — installable, non-functional. composer require may resolve, but nothing will happen at runtime: Laravel's package auto-discovery looks for Illuminate\Support\ServiceProvider implementations, and this package ships none. No config file will be publishable, no view namespace registered, no route or middleware registered. The only realistic path is manual extraction: copy the markup/CSS/JS out of the bundle and re-home it as a Blade component or @include. That is a port, not an integration.

Technical risk — bifurcated. Engineering risk is low: the code footprint for a cookie notice <div> is tiny, the license is MIT (clean for forking/attribution), and there is no privileged execution surface to attack. Product/compliance risk is high and is the dominant consideration:

  • A passive "cookie explanation div" is a notice, not consent. Under ePrivacy Directive 2002/58/EC Art. 5(3) and GDPR Arts. 6/7, non-essential cookies require opt-in consent prior to any script execution. French CNIL guidance (a natural reading given the author's locale) explicitly rejects "by continuing to browse you accept" and requires a refuse option as easy as accept, purpose-scoped choices, consent evidence, and easy withdrawal. A div that merely explains cookies almost certainly fails the job it is named after.
  • The package likely provides no script gating, no consent state, no logging/audit trail, no withdrawal UI, and no categorization (analytics vs. marketing vs. essential).
  • Dependency risk is real: a Symfony bundle from an older era likely pins symfony/framework-bundle / PHP constraints that will collide with the modern Symfony components Laravel already installs, producing resolver conflicts or forcing downgrades.

Key questions (for the requester / legal):

  1. Is the goal a consent management capability (blocking + recording + withdrawal) or merely a cosmetic banner? These are different products with different vendors.
  2. Which jurisdictions and regulators are in scope (EU-wide vs. FR/CNIL, DE/DSK), and is a DPO or counsel sign-off required before ship?
  3. Which cookie categories and third-party tags (GA4, Meta Pixel, Hotjar, session/auth) must be gated, and who owns that tag inventory?
  4. Are there consent-evidence or audit-trail requirements (proof of consent per user, timestamp, version of policy text)?
  5. Is a first-party build acceptable, or is procurement of a maintained CMP (OneTrust, Cookiebot, Osano, or a Laravel-native package) the preferred route?
  6. What is our appetite for adopting a 10-star, 0-dependent dependency versus vendoring logic?

Integration Approach

Stack fit. Assume Laravel 9–11, PHP 8.1+, Blade, Vite, and a service-provider + publishable-config pattern. This package fits none of that. A conforming implementation would need: a Blade component (<x-cookie-notice />), a publishable config for text/link/policy URL, a small JS module registered via Vite, and — critically — a middleware or tag-manager service that suppresses non-essential scripts until consent is recorded.

Migration path. Recommended sequence: (1) treat the repo as a reference implementation only, do not add it to composer.json; (2) extract the markup/CSS as a Blade partial and restyle to our design system; (3) if compliance depth is needed, build first-party: a ConsentService that persists categories to a first-party cookie or DB, a consent middleware, and a Blade-less script-gating helper (@consent('analytics') … @endconsent); (4) alternatively evaluate a Laravel-native package (e.g., spatie/laravel-cookie-consent or a hosted CMP SDK) whose integration model actually matches ours. Estimated port effort for a cosmetic banner: ~0.5–1 dev day. Estimated effort for genuine consent gating: 5–10 dev days plus legal review.

Compatibility. Two blockers to validate before any decision: (a) the package's PHP constraint and Symfony version pins versus our Laravel version's transitive Symfony components; (b) template engine (Twig requires twigbridge, another unmaintained dependency). Neither is worth resolving for a div. Also confirm the package has no Laravel extra.laravel block and no Illuminate imports — near-certain.

Sequencing.

  1. Discovery (1–2 days): read the source, confirm Symfony/Twig, inventory what it does not do (gating, logging, withdrawal).
  2. Legal scoping (1 week, parallel): DPO/counsel define required consent behaviors per market.
  3. Decision gate: adopt-and-port (banner only) vs. build first-party CMP-lite vs. buy a CMP. Gate on legal requirements, not on the package.
  4. Implementation: Blade component + config publish + script-gating middleware behind a feature flag.
  5. Rollout: enable per-market; instrument banner impression/accept/refuse rates.
  6. Decommission the evaluation branch so the repo never enters the dependency graph.

Operational Impact

Maintenance. Assume unmaintained: 10 stars, 0 dependents, composite score ≈1.0, and no evidence of an active release or security-response cadence. There is no upgrade path tied to our Laravel or PHP upgrade cycle, and no one upstream to file a CVE with. If vendored, we own it permanently — including the CSS/JS and its future accessibility fixes. That ownership cost is small for markup, but it is ours alone.

Support. No vendor, no SLA, no community to lean on. Escalation is entirely internal. Practically, this means two owners must be named: an engineering owner (component, gating middleware, asset pipeline) and a compliance owner (DPO or counsel) who signs off on the banner copy, category definitions, and consent flow. A banner shipped without a named compliance owner is an audit liability, not a feature.

Scaling. Runtime scaling is a non-issue — it is a static fragment served with the page, no server-side state. The scaling questions are organizational: (a) if we extend to real consent management, consent records become user data subject to GDPR Art. 7(1) accountability and deletion/export obligations, which means schema, retention, and DSAR handling; (b) if we serve multiple brands/markets, banner copy and category sets must be config-driven, not hardcoded in a vendored template; (c) CDN and full-page caching can serve a stale or previously-dismissed banner state unless consent is resolved client-side before paint — handle the flash-of-banner issue deliberately.

Failure modes.

  • Silent compliance failure (highest severity): banner renders, scripts still fire on page load, no consent actually obtained — looks compliant, isn't. Detect via tag-audit in CI or a synthetic check.
  • Asset publish failure: CSS/JS absent after deploy, banner renders as unstyled markup or is invisible; page looks broken.
  • Composer conflict / resolver downgrade: attempting installation drags Symfony bundles or forces a downgrade of a shared component, breaking unrelated features.
  • Cache staleness: dismissed-state served to new users (or vice versa) via CDN/response cache; consent rate metrics become meaningless.
  • Cookie collisions: generic cookie names conflicting with an existing analytics or auth cookie, corrupting session or consent state.
  • Accessibility/UX regression: banner traps focus, blocks content on mobile, or lacks a refuse path — itself a CNIL/accessibility finding.
  • Legal drift: regulation or regulator guidance updates (as CNIL did in 2020–21) and the vendored copy never changes.

Ramp-up. Developer ramp-up is genuinely trivial — a few hours to read the source and lift the markup; a mid-level engineer can port it in a day. The real ramp-up is legal and cross-functional: expect a week of DPO/counsel time to define consent scope, plus design review for accessible accept/refuse parity. Plan accordingly rather than treating this as a one-ticket drop-in.

Recommendation. Do not adopt as a dependency. Treat leblanc-simon/eu-cookie-law-bundle as a design reference for a banner's markup only, and satisfy the actual requirement — lawful, gated, recorded EU consent in a Laravel application — either with a first-party Blade component plus consent middleware or a maintained CMP. The framework mismatch is decisive, but the compliance gap is the reason not to pursue a port of the original 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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package