lemric/cookie-consent-bundle
A Symfony bundle for adding a cookie consent banner to your application. It helps you present cookie notices, collect visitor consent, and manage preferences, supporting GDPR-style compliance without hand-rolling a consent flow. Lightweight and quick to configure in any Symfony app.
Architecture fit — fundamental mismatch with the stated stack. The package is a Symfony bundle, not a Laravel package. Its entry point is a Symfony\Component\HttpKernel\Bundle\Bundle subclass registered via config/bundles.php, with services wired through a DI extension and Twig templates. Laravel has no bundle registry and its package auto-discovery only recognizes Illuminate\Support\ServiceProvider. composer require lemric/cookie-consent-bundle in a Laravel app will install files that never boot. The only Symfony surface Laravel shares is a handful of decoupled components (HttpFoundation, Console, Process) — not the HttpKernel event system or the container compilation this bundle depends on.
Integration feasibility. In a genuine Symfony application: feasible and small — enable the bundle, configure consent categories, override Twig templates, gate script tags on the consent state. In a Laravel application: not feasible as-is. A wrapper ServiceProvider that manually binds the bundle's services is a dead end, because the bundle's controller and event subscribers rely on Symfony kernel events and container conventions Laravel does not dispatch. The realistic path is a fork of the consent-storage and banner logic into a native Laravel package (ServiceProvider + Blade component + middleware + config), roughly 2–4 engineer-days of work.
Technical risk — concentrated in compliance, not code. This is a legal-risk surface. The package's stated purpose is AVG/GDPR compliance, but at 0 stars and 0 dependents there is no evidence of external review of its consent semantics. Specific unknowns that a DPO will ask about: whether it blocks cookies and scripts prior to consent or merely renders a banner (banner-only tools are the most common false sense of compliance); whether it persists a consent record with timestamp, policy version/hash, and categories granted; whether consent is revocable and re-prompted on policy change. Supply-chain risk is also elevated: single maintainer, no dependents, no visible community — an unmaintained dependency sitting directly on a regulatory obligation.
Key questions for the maintainer / spike.
Stack fit. This package fits only Symfony 5/6/7 projects. For a Laravel-first organization it is the wrong artifact entirely. The credible alternatives are framework-native packages (spatie/laravel-cookie-consent, whitecube/laravel-cookie-consent) for the banner layer, or a hosted CMP with a contractual DPA (Cookiebot, Osano, Usercentrics, OneTrust) for defensible compliance evidence. Note that the banner is the cheap half of the problem; script blocking and consent logging are the parts that carry the legal weight.
Migration path. Symfony: composer require, register in bundles.php, configure categories, publish/override Twig templates, wire consent checks into each third-party script tag, verify with a cookie scanner. Laravel (recommended): do not wrap — fork. Lift the consent decision logic and cookie payload into a first-party package, replace Twig with Blade, replace the kernel subscriber with middleware, replace bundle config with config/cookie-consent.php. Treat the upstream repo as a reference implementation, not a dependency. MIT licensing makes this clean from an IP standpoint.
Compatibility. Verify PHP version floor, Symfony constraint range, and Twig dependency before anything else. If the repo pins symfony/framework-bundle to a narrow range, the fork-and-adapt cost rises. In a Laravel context, also check for conflict with the app's existing middleware stack, session driver, and any edge/CDN caching that would serve a stale banner state across users.
Sequencing.
Maintenance. Assume you own this code. At 0 stars and 0 dependents there is no community to absorb upgrades, and a single maintainer is a bus-factor of one. Budget for an internally maintained fork with a named owner. Positively, the MIT license and small surface area mean the fork is cheap to carry; a few hundred lines of consent logic is not a heavy long-term liability. Track upstream for security patches, but do not assume they will arrive.
Support. No SLA, no vendor contact, no compliance attestation. GitHub issues only. Any question your DPO or outside counsel raises about consent semantics will be answered by your own engineers reading the source. That is acceptable for a banner; it is uncomfortable for the system of record for regulatory consent.
Scaling. Runtime cost is negligible — a cookie write and a template render. The real scaling considerations are non-functional: server-rendered banners interact poorly with full-page CDN caching (a cached page can pin one visitor's consent state for everyone), and multi-domain, multi-locale, and subdomain-sharing configurations each need explicit cookie Domain/SameSite decisions. If you add server-side consent logging, that becomes a write path with retention and PII-handling obligations of its own.
Failure modes.
Ramp-up. Low for a Symfony developer — a day to integrate and template. The effort is not engineering; it is the cookie inventory, legal review, and DPO sign-off, which run in weeks and are entirely unaddressed by this package. Frame the estimate accordingly: this is a compliance program with a small tooling component, not a library adoption with a small legal component. At 0.2 overall score with zero adoption signals, the honest recommendation is to treat this as a reference implementation to fork, or to skip it in favor of a supported CMP — not to adopt it as a dependency.
How can I help you explore Laravel packages today?