PHPackages                             ezsystems/privacy-cookie-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ezsystems/privacy-cookie-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ezsystems/privacy-cookie-bundle
===============================

Privacy cookie banner integration bundle into regular Symfony 2.x application (supports eZ Publish/eZ Platform)

v0.2(11y ago)227.8k11[3 issues](https://github.com/ezsystems/EzSystemsPrivacyCookieBundle/issues)GPL-2.0PHP

Since Apr 8Pushed 7y ago25 watchersCompare

[ Source](https://github.com/ezsystems/EzSystemsPrivacyCookieBundle)[ Packagist](https://packagist.org/packages/ezsystems/privacy-cookie-bundle)[ RSS](/packages/ezsystems-privacy-cookie-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (11)Used By (0)

Privacy Cookie Bundle
=====================

[](#privacy-cookie-bundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/d56824538af4a86ad0edb41cf8c6301ba08b4ba7e36035bcb54221107a845b33/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33363837613862302d633236382d343963662d623037322d3135613130643932303730392f6269672e706e67)](https://insight.sensiolabs.com/projects/3687a8b0-c268-49cf-b072-15a10d920709)

This bundle adds privacy cookie banner into Symfony applications.

[![screenshot](https://cloud.githubusercontent.com/assets/3033038/14012485/5087f198-f1a6-11e5-881c-028bbe806cb3.png)](https://cloud.githubusercontent.com/assets/3033038/14012485/5087f198-f1a6-11e5-881c-028bbe806cb3.png)

Requirements
------------

[](#requirements)

- Symfony v2.6 or later (including Symfony 3.x)

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

[](#installation)

This package is available via Composer, so the instructions below are similar to how you install any other open source Symfony Bundle.

Run the following command in a terminal, from your Symfony installation root (pick most recent release):

```
php composer.phar require ezsystems/privacy-cookie-bundle
```

Enable the bundle in `app/AppKernel.php` file:

```
$bundles = array(
    // existing bundles
    new EzSystems\PrivacyCookieBundle\EzSystemsPrivacyCookieBundle(),
);
```

Add external assets to your bundle:

- CSS:

```
bundles/ezsystemsprivacycookie/css/privacycookie.css

```

- JS:

```
bundles/ezsystemsprivacycookie/js/privacycookie.js

```

### Assetic (*Optional*)

[](#assetic-optional)

Enable the Assetic bundle in `app/AppKernel.php` file:

$bundles = array( // ... // starting from Symfony 2.8 you have to enable AsseticBundle manually if you haven't done it before new Symfony\\Bundle\\AsseticBundle\\AsseticBundle() );

Add the following minimal configuration in `config.yml` file to enable `Assetic` support in your application (Symfony 2.8 and later):

```
assetic:
    debug: '%kernel.debug%'
    use_controller: '%kernel.debug%'
    filters:
        cssrewrite: ~
```

If you are installing the bundle via `composer require` you must also copy assets to your project's `web` directory. You can do this by calling Symfony's built-in command from the project root directory:

For Symfony 2.x:

```
php app/console assets:install --symlink
```

For Symfony 3.x:

```
php bin/console assets:install --symlink
```

In production environment you have to dump assets using `Assetic` built-in command:

For Symfony 2.x:

```
php app/console assetic:dump -e=prod
```

For Symfony 3.x:

```
php bin/console assetic:dump -e=prod
```

Usage
-----

[](#usage)

Insert the following `{{ show_privacy_cookie_banner(%privacy_policy_url%) }}` helper somewhere in your footer template before the body ending tag. Replace the `%privacy_policy_url%` parameter with your policy page address.

Note that the `%privacy_policy_url%` parameter is not required, in this case no policy link will be shown.

The following optional parameters can be set as a second argument in an array format:

ParameterDefault valueDescriptioncookieNameprivacyCookieAcceptedSets your own status cookie namecookieValidity365Says how many days privacy banner should be hidden when user accepts policy?cookiePathnullSpecifies the cookie path (by default cookie will be available only for the current domain)captionCookies help us create a good experience (...)Sets your own banner message captionlearnMoreTextLearn MoreSets title and text of privacy linkextraParamsExtra ParamsSend extra params in your override templateExample of usage in standard Symfony application:

```
{{ show_privacy_cookie_banner('http://ez.no/Privacy-policy') }}
```

or

```
{{ show_privacy_cookie_banner('http://ez.no/Privacy-policy', {
   cookieName: 'myCookie',
   cookieValidity: 7,
   cookiePath: '/',
   caption: 'Nice to see you here',
   learnMoreText: 'Find out more'
}) }}
```

If you are using eZ Publish / Platform you can use `ez_urlalias` to generate path for specified content object:

```
{{ show_privacy_cookie_banner(path('ez_urlalias', {contentId: 94}), {
   cookieName: 'myCookie',
   cookieValidity: 7,
   caption: 'Nice to see you here'
}) }}
```

Example of usage extraParams:

```
{{ show_privacy_cookie_banner('http://ez.no/Privacy-policy', {
   cookieName: 'myCookie',
   extraParams: {
       my_param1: value_my_param1 ,
       my_param2: value_my_param2
   }
}) }}
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~130 days

Recently: every ~188 days

Total

10

Last Release

2928d ago

Major Versions

v0.2 → v1.0.0-beta12015-08-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/235928?v=4)[Bertrand Dunogier](/maintainers/bdunogier)[@bdunogier](https://github.com/bdunogier)

![](https://avatars.githubusercontent.com/u/681611?v=4)[Ibexa Bot](/maintainers/ezrobot)[@ezrobot](https://github.com/ezrobot)

![](https://avatars.githubusercontent.com/u/130489?v=4)[Łukasz Serwatka](/maintainers/lserwatka)[@lserwatka](https://github.com/lserwatka)

---

Top Contributors

[![clash82](https://avatars.githubusercontent.com/u/3033038?v=4)](https://github.com/clash82 "clash82 (11 commits)")[![andrerom](https://avatars.githubusercontent.com/u/289757?v=4)](https://github.com/andrerom "andrerom (10 commits)")[![anijra](https://avatars.githubusercontent.com/u/6748784?v=4)](https://github.com/anijra "anijra (2 commits)")[![nicodmf](https://avatars.githubusercontent.com/u/173332?v=4)](https://github.com/nicodmf "nicodmf (1 commits)")[![amauryvallier](https://avatars.githubusercontent.com/u/1759202?v=4)](https://github.com/amauryvallier "amauryvallier (1 commits)")[![vidarl](https://avatars.githubusercontent.com/u/289778?v=4)](https://github.com/vidarl "vidarl (1 commits)")[![bedo-abn](https://avatars.githubusercontent.com/u/13997115?v=4)](https://github.com/bedo-abn "bedo-abn (1 commits)")[![krzyraj](https://avatars.githubusercontent.com/u/10994836?v=4)](https://github.com/krzyraj "krzyraj (1 commits)")

---

Tags

ez-platformphpprivacy-cookie-bundlesymfonysymfony-bundlecookiesprivacyPolicy

### Embed Badge

![Health badge](/badges/ezsystems-privacy-cookie-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ezsystems-privacy-cookie-bundle/health.svg)](https://phpackages.com/packages/ezsystems-privacy-cookie-bundle)
```

###  Alternatives

[whitecube/laravel-cookie-consent

Register, configure and ask for cookies consent in a EU-compliant way.

498731.9k2](/packages/whitecube-laravel-cookie-consent)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

219426.2k](/packages/statikbe-laravel-cookie-consent)[opengento/module-gdpr

Gdpr Compliance Module for Magento 2

14686.0k](/packages/opengento-module-gdpr)[scify/laravel-cookie-guard

A Laravel package that provides a Cookies consent floating window and publishes the Cookies for the different consent categories

14621.4k](/packages/scify-laravel-cookie-guard)[georgringer/gdpr

Make TYPO3 more compatible to GDPR

4657.7k](/packages/georgringer-gdpr)[josantonius/cookie

PHP library for handling cookies.

2241.5k4](/packages/josantonius-cookie)

PHPackages © 2026

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