Cookie consent for Symfony applications
Cookie consent for Symfony, via a small Twig extension — a local runtime, Consent Mode v2, and no third-party requests on your visitor’s page. One service class plus three template calls.
or see all twelve platforms
Why Symfony sites need consent that actually blocks
Symfony powers custom enterprise PHP applications, frequently in regulated or data-sensitive contexts. Its users are experienced developers with strong opinions about what goes into their codebase.
Installing on Symfony
01
Copy one file
Place CookieCraftExtension.php at src/Twig/. With Symfony’s default config it is auto-registered as a service — nothing to add to services.yaml.
02
Add three Twig tags
03
Clear the cache
What’s specific to Symfony
Symfony needs a different approach from every other platform here, and the reason is worth stating plainly: Twig cannot execute PHP. So the three-include pattern used elsewhere does not work, and any documentation telling you to paste PHP into a .twig file is simply wrong. Instead you copy one file to src/Twig/CookieCraftExtension.php — auto-registered as a service — and add three Twig tags to your base template. The extension is not a workaround; it is the correct integration for a Twig-based application.
Credentials come from .env.local before .env, because .env is usually committed with placeholder values while .env.local holds the real ones. Cookie Craft mirrors that priority exactly — getting it backwards is how automated installers report Access denied on a database that works perfectly.
Included on Symfony, not upsold
No feature is held back for a higher tier. One plan, everything in it.
Google Consent Mode v2
The four signals GA4 and Google Ads need to run properly in the EEA — analytics_storage, ad_storage, ad_user_data, ad_personalization — set from your visitor’s real choice.
GTM, Meta & TikTok
Google Tag Manager, Meta Pixel and TikTok Pixel get base placement and consent-aware loading — no snippets pasted into your Symfony templates, no second plugin to gate them. Your tracking plan still defines the events and conversions.
One licence, one root domain
The licensing check runs in the background a few times a day, never during a visitor’s request, and one licence covers every subdomain of your root domain.
A guide for your exact site
Your install guide is generated with your real Symfony paths already filled in, in twelve languages — no example.com placeholders to translate into your own setup.
Why it matters here
Symfony teams will evaluate this on architecture, not on feature lists. The relevant facts: it is a self-contained PHP and JavaScript runtime inside your own project, it makes no outbound requests during a page render, consent records live in your database, and the integration surface is one service class plus three template calls. You can read all of it.
What it does — and what it doesn’t
Cookie Craft does not scan your Symfony site to discover cookies automatically, and it does not write your privacy policy for you. It gives you the mechanism: a banner your visitors actually interact with, real blocking of the scripts you configure, and correct Consent Mode v2 signals to Google. What you declare in it is up to you.
Consent for Symfony, done properly.
Self-hosted, first-party, and everything included — €25/month or €240/year per root domain.