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.
composer require setono/consent-bundle. On Symfony Flex the bundle is auto-registered and a recipe usually drops a config file at config/packages/setono_consent.yaml; if not, add Setono\ConsentBundle\SetonoConsentBundle::class => ['all' => true] to config/bundles.php.DependencyInjection/Configuration.php and the bundle's Resources/config/* as the real documentation. Run bin/console debug:config setono_consent and bin/console debug:container --tag=… to discover the actual config keys and service IDs before writing code.debug:config setono_consent to find the exact key (likely under default_consent_checker or similar) and set it to the checker service you want used by default, instead of wiring it manually.if (consent) { … } through templates. Inject the consent manager into the controllers/subscribers that own the side effect (setting a cookie, calling an analytics SDK) and guard at that boundary.necessary, analytics, marketing, …) in config and treat them as the single source of truth. Both the banner template and the server-side guards should read from the same map.kernel.request subscriber to resolve consent state once per request and stash it on the request/manager, rather than re-reading cookies in every service.twig.extension function (e.g. has_consent('analytics')) for template conditionals; keep the heavy logic server-side so views stay declarative.ServiceProvider, then add a Blade directive/middleware mirroring the Twig extension. Don't try to boot the Symfony bundle in Laravel.Configuration.php before relying on it.debug:container, debug:event-dispatcher, and reading services.php/services.yaml in the bundle are faster than guessing. Grep the bundle source for tags to find extension points. For v1.2.0, use debug:config setono_consent to confirm the default consent checker option name and default value.same_site, secure, and http_only defaults against your domain setup; a wrong SameSite silently drops server-side consent on cross-site navigations. Also verify that the default consent checker configured via v1.2.0 actually implements the expected contract/interface.debug:container after changing the v1.2.0 config.How can I help you explore Laravel packages today?