indigophp/cookie-consent-bundle
Symfony bundle for GDPR-friendly cookie consent. It shows a customizable consent banner, lets visitors accept or reject cookie categories, and stores their choices so analytics, tracking, and other scripts load only after permission is granted.
Architecture fit — the primary blocker is a stack mismatch, not a code-quality issue. This is a Symfony Bundle: it registers through AppKernel::registerBundles(), auto-loads a DI Extension with a configuration tree, and renders through Twig. Laravel has no equivalent bundle lifecycle, no Extension auto-discovery, and typically no Twig. The only genuinely portable artifacts are the front-end Cookie Consent JS/CSS assets and the default consent configuration array — the PHP integration layer is dead weight in a Laravel codebase. A TPM should record this as "not installable as-is" rather than "needs configuration," because the distinction changes the effort estimate from hours to days and the sourcing decision from adopt to borrow.
Integration feasibility — low, and what remains is a build, not an integration. There is no facade, no middleware, no Artisan command, no Blade view, no vendor:publish tag, and no Laravel package discovery. The realistic path is: copy the JS/CSS out of Resources/, write a config file, write a Blade component, wire a small service provider, and remove the Composer requirement. That is roughly 50–150 lines of our own code plus asset handling. The TPM framing that matters: the package's contribution to our deliverable is a reference design and a bundled JS payload, not a dependency.
Technical risk — high, on three independent axes.
--ignore-platform-reqs hacks that our CI should reject.Key questions to resolve before any further evaluation — these are the TPM's triage list:
Recommendation for the decision log: reject as a dependency; retain as reference source. If we want this UX, vendor the JS and reimplement the wrapper natively.
Stack fit — none at the package level. A Laravel 10/11 app on PHP 8.2+ against a Symfony 2/3-era bundle is a double version skew: framework and runtime. Even a hypothetical bundle shim would drag symfony/framework-bundle internals and a Twig runtime dependency into our lockfile for the sake of rendering two <div>s and a script tag. That is negative value in a Laravel container.
Migration path — extract, do not install. The sequence a TPM should put in the ticket:
Resources/ directory and copy the JS/CSS into resources/vendor/cookie-consent/ (or a small internal Vite entry, which is the better long-term home).config/cookie-consent.php with env-driven overrides — COOKIE_CONSENT_ENABLED, policy URL, category definitions, theme.<x-cookie-consent />) rendered from a layout partial or view composer, gated by config so non-production environments suppress it.CookieConsentServiceProvider for config merge and asset registration. Skip the container bindings, events, and Twig entirely.Compatibility checks to run if anyone insists on installing: composer why-not indigophp/cookie-consent-bundle and composer show --all to surface PHP/Symfony constraints; confirm the bundle class registers through a mechanism Laravel's PackageManifest ignores (it will, so zero functionality arrives automatically); and check whether twig/twig is a hard requirement, since that puts an unused template engine in our production lockfile.
Sequencing — compliance first, UI last. This ordering is the most valuable thing the TPM produces, because it reframes the package as a late-stage cosmetic decision rather than an early-stage architecture one:
orestbida/vanilla-cookieconsent, Klaro!) versus in-house. Be explicit that spatie/laravel-cookie-consent only hides cookies until a banner is accepted — it is not a CMP and does not solve EU prior-consent or logging.Steps 1–5 dominate the effort; the package's contribution to the critical path rounds to zero. That is the core finding to communicate upward.
Maintenance — unacceptable as a standing dependency. An archived repository is unmaintained by definition: no CVE patching, no compatibility release for the next Laravel or PHP major, no one to ask when behavior breaks. Every future framework upgrade becomes a forensic exercise in code we cannot fix from upstream. Owning the extracted JS/CSS is strictly better — it at least lives in our repo, under our CI, subject to our review process and our security scanning.
Support — none. No vendor, no SLA, no maintainer responsiveness. Internal support burden lands on whoever performed the extraction; if that is one engineer and it is undocumented, we have a single point of failure for a compliance-relevant surface. With 15 stars and 0 dependents there is also no community corpus — no Stack Overflow answers, no issue history worth mining — so every troubleshooting session starts from zero.
Scaling — low technical ceiling, high process ceiling.
Failure modes to design against — each needs a documented decision, not an assumption.
Ramp-up — small and non-transferable. A competent Laravel engineer reads the extracted partial and config in under a day; the package itself teaches nothing reusable. The institutional knowledge that does need to persist is the requirement definition, the script inventory and classification, the consent-record schema, and the fail-safe posture — none of which the package provides. Onboarding cost for a successor is effectively "read our internal doc," which is another argument for the in-house build: it forces the documentation the archived bundle lets you skip, and it converts a compliance-critical surface from an orphaned dependency into owned, reviewed, testable code.
How can I help you explore Laravel packages today?