nowo-tech/cookie-consent-bundle

Symfony bundle providing a GDPR cookie consent modal with category toggles and optional consent logging

Maintainers

Package info

github.com/nowo-tech/CookieConsentBundle

Type:symfony-bundle

pkg:composer/nowo-tech/cookie-consent-bundle

Transparency log

Statistics

Installs: 63

Dependents: 0

Suggesters: 1

Stars: 0

Open Issues: 0

v1.4.2 2026-07-29 10:16 UTC

This package is auto-updated.

Last update: 2026-07-29 20:32:02 UTC


README

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

Found this useful? Install from Packagist · Give it a star on GitHub so more developers can find it.

Symfony bundle that renders a GDPR cookie consent modal with category toggles, optional per-cookie selection, cookie inventory, AJAX form submission, optional consent logging, and configurable Doctrine table prefix. Frontend behavior is implemented in TypeScript and built with Vite (make assetssrc/Resources/public/nowo-consent-modal.js).

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly.

Quick start

composer require nowo-tech/cookie-consent-bundle
# config/packages/nowo_cookie_consent.yaml
nowo_cookie_consent:
    doctrine:
        table_prefix: 'app_'   # optional; yields app_dashboard_cookie_log
    use_logger: true
{# templates/base.html.twig #}
{% if nowo_cookie_consent_should_embed_modal() %}
    {{ render(path('nowo_cookie_consent.show_if_not_set')) }}
{% endif %}

Install public assets:

php bin/console assets:install

Demo

make -C demo up-symfony8
# Bootstrap demo: http://localhost:8014

make -C demo up-symfony8-tailwind
# Tailwind demo: http://localhost:8015
  • demo/symfony8/ — FrankenPHP Symfony 8 app with Bootstrap 5
  • demo/symfony8-tailwind/ — same demo with Tailwind CSS and ui_theme: tailwind

See Demo with FrankenPHP for development vs. production worker mode.

Documentation

Additional documentation

Tests and coverage

Language Lines (approx.) Command
PHP 100% line coverage on src/ (run make coverage-check to refresh). See docs/COVERAGE.md. make coverage-check
TypeScript ~94% make test-ts
make test
make coverage-check
make test-ts
make assets
make release-check

PHP coverage target is ≥99% lines (prefer 100%; see Release and docs/COVERAGE.md). TypeScript coverage enforces a minimum of 90% (Vitest thresholds + .scripts/ts-coverage-percent.sh).