Batunet/cookie-consent-bundle — reverse-engineered prompt

Reverse engineered prompt

Build me a Symfony bundle that adds a cookie consent bar to a website so it helps with GDPR and AVG cookie compliance.

I want it to be easy to drop into a Symfony app and render in Twig, ideally in a way that avoids caching issues. The banner should support a light and dark look, show at the top or bottom, and let me configure cookie categories like analytics, tracking, marketing, and social media. It should also support a simpler mode where people can only accept all or deny all.

When someone saves their choices, store them in cookies for about a year, including a consent timestamp, a unique key, and per category yes or no values. I also want an option to log consent choices to the database with anonymized IPs, since site owners may need a record of what users agreed to.

Please include Twig helpers so templates can check whether a category is allowed and whether consent was already saved. Make the texts and styling easy to override, and look up current Symfony docs online if you need to.

Want more depth? Deep Reverse