setono/consent-bundle
Setono Consent Bundle is a Symfony bundle for managing user consent, including cookie and GDPR compliance. It provides consent storage, checks, and integrations to help your application respect visitor privacy choices.
Architecture fit
setono/consent-bundle is a Symfony bundle, not a Laravel package. Its value proposition is split in two: (a) setono/consent-contracts — a framework-agnostic PHP abstraction for asking "has this visitor consented to X?"; and (b) the bundle — Symfony DI extension, configuration tree, service definitions, event subscribers, and Twig helpers that wire those contracts into a Symfony kernel. Layer (a) is portable; layer (b) is not. Laravel has no Bundle::boot() equivalent and will not load *Bundle classes.composer require setono/consent-bundle "just works" in Laravel is wrong.default_consent_checker-style key that selects which checker implementation is injected when none is specified. It does not add contract surface, does not change the interface shapes in setono/consent-contracts, and does not make the bundle loadable in Laravel. Net effect on architecture fit: none.Integration feasibility
@consent directive.ConsentServiceProvider must explicitly bind a default implementation rather than letting container resolution fail open. We get the same capability for free in Laravel config and should model it deliberately (config/consent.php → default_checker).Illuminate\Http\Request extends Symfony\Component\HttpFoundation\Request, and symfony/http-foundation is already a transitive Laravel dependency. If the bundle's consent resolution touches only HttpFoundation, the porting surface shrinks. It will not help with symfony/dependency-injection or framework-bundle — both of which the v1.2.0 feature is built on.Technical risk
Key questions
composer.json constraints, and do they collide with our Laravel/Symfony component pins?Stack fit
setono/consent-contracts as a dev-time reference and optional dependency, and treat the bundle as not installable — v1.2.0 does not change this.ConsentServiceProvider exposing a ConsentManager singleton behind a facade, implementing the contracts' interfaces. Blade directive (@whenConsented('analytics')) for template gating; middleware (EnsureConsent:analytics) for route-level gating.config/consent.php with a default checker key bound in the service provider, so the "which checker wins" decision is explicit, reviewable in a PR, and testable — rather than an implicit container fallback.Migration path
ConsentManager interface and default-deny implementation before wiring any analytics. This decouples us from the package decision.consent_records table (subject, category, granted/denied, policy version, timestamp, IP/UA hash) — this is ours to own regardless of package.Compatibility
symfony/http-foundation version alignment with Laravel's pinned range before committing; a mismatch here forces a fork or a version downgrade we won't accept.setono/consent-contracts fork under our org with a documented divergence policy. Note that v1.2.0's feature is bundle-only, so a contracts-only fork stays small.Sequencing
Maintenance
Support
Scaling
Failure modes
default key is the deny checker.Ramp-up
How can I help you explore Laravel packages today?