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.
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:
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):
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.
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.
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.
How can I help you explore Laravel packages today?