PHPackages                             fluffy-factory/gdpr-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. fluffy-factory/gdpr-bundle

ActiveSymfony-bundle

fluffy-factory/gdpr-bundle
==========================

GDPR Bundle

1.0.9(5y ago)2998↓100%MITPHPPHP &gt;=7.2.0

Since Jul 18Pushed 5y agoCompare

[ Source](https://github.com/fluffy-factory/gdpr-bundle)[ Packagist](https://packagist.org/packages/fluffy-factory/gdpr-bundle)[ Docs](https://github.com/FluffyFactory/GdprBundle)[ RSS](/packages/fluffy-factory-gdpr-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)DependenciesVersions (11)Used By (0)

Gdpr Bundle
===========

[](#gdpr-bundle)

Installation
------------

[](#installation)

Install package

```
composer require fluffy-factory/gdpr-bundle

```

Install assets

```
php bin/console asset:install

```

Configuration
-------------

[](#configuration)

```
# config/packages/gdpr.yaml

gdpr:
  redirection_url: 'fluffy_gdpr' # If you don't specify a route, the user will be redirected to the route he is on.
  btn:
    deny: true
    accept: true
  design:
    disable: false
    bg_color: '#292e33'
    text_color: '#ffffff'
    btn_deny_bg_color: '#D23A4B'
    btn_deny_text_color: '#ffffff'
    btn_allow_bg_color: '#0ED198'
    btn_allow_text_color: '#ffffff'

  cookies:
    my_cookie_required:
      name: cookie_name
      description: "description ..."
      detail: "expiration date ..."
      required: true
    my_cookie_optionnal:
      name: cookie_name_1
      description: "description ..."
      detail: "expiration date ..."
      required: false
```

---

**NOTE**
If the design.disable property is true so the *style* attribute will not be added to template's elements.
------------------------------------------------------------------------------------------------------------------

[](#noteif-the-designdisable-property-is-true-so-the-style-attribute-will-not-be-added-to-templates-elements)

### Route

[](#route)

The bundle provide the route 'fluffy\_gdpr'. You can edit the content to explain your cookies and configure them.

```
# config/routes/gdpr.yaml

gdpr:
  resource: "@GdprBundle/Controller/GdprController.php"
  type: annotation
```

```
{# privacy.html.twig #}

{% block required_cookies_table %}
    {{ 'cookies.required.title'|trans({},'GdprBundle') }}

            {{ 'cookies.name'|trans({},'GdprBundle') }}
            {{ 'cookies.description'|trans({},'GdprBundle') }}
            {{ 'cookies.details'|trans({},'GdprBundle') }}

        {% for cookie in required_cookies %}

                {{ cookie.name|trans({},'GdprBundle') }}
                {{ cookie.description|trans({},'GdprBundle') }}
                {{ cookie.detail|trans({},'GdprBundle') }}

        {% endfor %}

{% endblock %}

{% block optionnal_cookies_table %}
    {{ 'cookies.optionnal.title'|trans({},'GdprBundle') }}

    {{ form_start(form) }}
    {% for key, optionnal in optionnal_cookies %}
        {{ optionnal.name }}
        {{ form_widget(form[key]) }}
        {{ optionnal.description }}
        {{ optionnal.detail }}
    {% endfor %}

    {{ 'cookies.accept'|trans({},'GdprBundle') }}
    {{ form_end(form) }}
{% endblock %}
```

##### Twig

[](#twig)

Add this script tag, the `cookies.js` script need it to knows which cookies write when the user accept or deny the privacy policy from the `cookie_bar.html.twig`

```

        var optionnalCookies = {{ getOptionnalCookiesNames() }}

{% block javascripts %}

{% endblock %}
```

Add stylesheets

```
{% block stylesheets %}

{% endblock %}
```

**showCookieBar()** check if the user already has all your cookies from the configuration file.

```
{% if showCookieBar() %}
    {% include '@Gdpr/cookie_bar.html.twig' %}
{% endif %}
```

In case of optionnals cookies you can manage them in case-by-case with the twig function **allowedCookie('cookie\_name')**

```
{% if allowedCookie('google_analytics') %}
   {# insert your code here ... #}
{% endif %}
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~80 days

Recently: every ~136 days

Total

9

Last Release

1842d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffaa84c36540abad3e617af772bb597de0082ee906d42c7eda8b436362d414c0?d=identicon)[Masth0](/maintainers/Masth0)

---

Top Contributors

[![Masth0](https://avatars.githubusercontent.com/u/20602741?v=4)](https://github.com/Masth0 "Masth0 (20 commits)")[![devcut](https://avatars.githubusercontent.com/u/12175420?v=4)](https://github.com/devcut "devcut (9 commits)")[![artgris](https://avatars.githubusercontent.com/u/22889596?v=4)](https://github.com/artgris "artgris (2 commits)")

---

Tags

cookiesgdprsymfonybundlegdpr

### Embed Badge

![Health badge](/badges/fluffy-factory-gdpr-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/fluffy-factory-gdpr-bundle/health.svg)](https://phpackages.com/packages/fluffy-factory-gdpr-bundle)
```

###  Alternatives

[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.6M17](/packages/endroid-qr-code-bundle)[prezent/doctrine-translatable-bundle

Integrate the doctrine-translatable extension in Symfony

14698.4k5](/packages/prezent-doctrine-translatable-bundle)[ras/flash-alert-bundle

FlashAlertBundle provides a simplified way to handle (add/display) Symfony flash messages. Client side scripts are written in pure JavaScript.

2423.3k](/packages/ras-flash-alert-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
