PHPackages                             phpeek/xsolve-cookie-acknowledgement-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. phpeek/xsolve-cookie-acknowledgement-bundle

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpeek/xsolve-cookie-acknowledgement-bundle
===========================================

XSolve Cookie Acknowledgement Bundle to handle new privacy law

v2.0.0(7y ago)04.1kMITPHP

Since Apr 30Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (6)Used By (0)

About
=====

[](#about)

[![knpbundles.com](https://camo.githubusercontent.com/2702ec6f2c4788c73253c15d8fce860cd3b580f7fc4abae609b9e68028e95603/687474703a2f2f6b6e7062756e646c65732e636f6d2f78736f6c76652d706c2f78736f6c76652d636f6f6b69652d61636b6e6f776c656467656d656e742d62756e646c652f6261646765)](http://knpbundles.com/xsolve-pl/xsolve-cookie-acknowledgement-bundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/187998ac46b8828974fb7956a63d7abf098e7030e6cc8c298635cfcc02f7802b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62383737303965622d616261652d343832352d383161352d3838303638343338653435642f6269672e706e67)](https://insight.sensiolabs.com/projects/b87709eb-abae-4825-81a5-88068438e45d)

This bundle provides information about an cookies usage, which is forced by European Union by so-called [EU cookie law](http://www.ico.org.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies).

It includes:

- fast &amp; easy integration and short learning curve
- automatic cookie bar injection on the bottom of the page
- ability to manually inject cookie bar (for example for iframes)
- ability to change text and "close button" name
- locale aware
- ability to provide own cookie bar template

This bundle requires Multibyte String extension.

[![Example usage](https://camo.githubusercontent.com/affbe906f10cf16db040b93e9ce56097d1ef48baa997757636594e4c8aa4f064/68747470733a2f2f7261772e6769746875622e636f6d2f78736f6c76652d706c2f78736f6c76652d636f6f6b69652d61636b6e6f776c656467656d656e742d62756e646c652f6d61737465722f5265736f75726365732f646f632f78736f6c76652d636f6f6b69652d61636b6e6f776c656467656d656e742d62756e646c652d6578616d706c652e706e67)](https://camo.githubusercontent.com/affbe906f10cf16db040b93e9ce56097d1ef48baa997757636594e4c8aa4f064/68747470733a2f2f7261772e6769746875622e636f6d2f78736f6c76652d706c2f78736f6c76652d636f6f6b69652d61636b6e6f776c656467656d656e742d62756e646c652f6d61737465722f5265736f75726365732f646f632f78736f6c76652d636f6f6b69652d61636b6e6f776c656467656d656e742d62756e646c652d6578616d706c652e706e67)

Installation
============

[](#installation)

1. Add to composer.json

    "require": { "xsolve-pl/xsolve-cookie-acknowledgement-bundle": "1.0.\*" },
2. Install dependencies

    composer install
3. Run the bundle in app/AppKernel.php

    public function registerBundles() { return array( // ... new Xsolve\\CookieAcknowledgementBundle\\XsolveCookieAcknowledgementBundle(), ); }

Usage
=====

[](#usage)

For all static pages
--------------------

[](#for-all-static-pages)

By default the cookie bar will be visible on every page after turning on bundle.

For iframes
-----------

[](#for-iframes)

Disable response injection in app/config/config.yml

```
xsolve_cookie_acknowledgement:
    response_injection: false

```

Include cookie bar in appropriate location

```
{% include 'XsolveCookieAcknowledgementBundle::cookie_acknowledgement_bar.html.twig' %}

```

Configuration options
---------------------

[](#configuration-options)

Configuration can be adjusted in app/config/config.yml

```
xsolve_cookie_acknowledgement:
    response_injection: true # default true
    template: custom_cookie_bar.html.twig # twig template name, default: XsolveCookieAcknowledgementBundle::cookie_acknowledgement_bar.html.twig

```

Altering cookie bar texts
-------------------------

[](#altering-cookie-bar-texts)

Place tranlations file in your app directory:

```
app/Resources/translations/XsolveCookieAcknowledgementBundle.en.yml

```

And change texts

```
cookie.message: My message
cookie.message.accept: Accept button text

```

Of course you can set up those texts in as many locales as you want.

Altering cookie bar apperance
-----------------------------

[](#altering-cookie-bar-apperance)

By default cookie bar comes with some default styles. If you wish to change those, use CSS. For example you may want pink background with placement on top of the page:

```
#cookie-law-info-bar {
    background: pink !important;
    top: 50px !important;
    bottom: auto !important;
}

```

Please note that every style needs `!important` to override provided inline styles.

Altering whole cookie bar template
----------------------------------

[](#altering-whole-cookie-bar-template)

You use your own template by setting it in the configuration (app/config/config.yml):

```
xsolve_cookie_acknowledgement:
    template: ::custom_cookie_bar.html.twig

```

In above case template is located in app/Resources/custom\_cookie\_bar.html.twig

Also base template can be reused be Twig extension (two blocks are used: xsolve\_cookie\_message and xsolve\_cookie\_message\_js), see example below:

```
{% extends "XsolveCookieAcknowledgementBundle::cookie_acknowledgement_bar.html.twig" %}

{% block xsolve_cookie_message %}
    {{ parent() }}
    This is something custom
{% endblock %}

{% block xsolve_cookie_message_js %}
    {{ parent() }}

        document.getElementById('js-cookie-law-close-button').onclick = function () {
            alert('Got ya!');
        }

{% endblock %}

```

Automated testing
=================

[](#automated-testing)

There are fe simple test to make sure that everything works fine. To run tests include this bundle into some Symfony2 project (Symfony Standard Edition is enough). Then put testsuite in app/phpunit.xml

```

    ../vendor/xsolve-pl/xsolve-cookie-acknowledgement-bundle/Xsolve/CookieAcknowledgementBundle/Tests/

```

And run

```
phpunit -c app/

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Total

4

Last Release

2835d ago

Major Versions

v0.1 → v1.0.02013-08-02

v1.0.1 → v2.0.02018-08-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/106d23debc5ab1917dee31146e9422599a38feecb8dac2db688c44fefa8378ef?d=identicon)[dyferencjal](/maintainers/dyferencjal)

---

Top Contributors

[![wowo](https://avatars.githubusercontent.com/u/100724?v=4)](https://github.com/wowo "wowo (11 commits)")[![chkris](https://avatars.githubusercontent.com/u/2265938?v=4)](https://github.com/chkris "chkris (7 commits)")[![krzysztof-gzocha-xsolve](https://avatars.githubusercontent.com/u/3098590?v=4)](https://github.com/krzysztof-gzocha-xsolve "krzysztof-gzocha-xsolve (7 commits)")[![phpeek](https://avatars.githubusercontent.com/u/1260260?v=4)](https://github.com/phpeek "phpeek (2 commits)")[![piotrpasich](https://avatars.githubusercontent.com/u/1180426?v=4)](https://github.com/piotrpasich "piotrpasich (1 commits)")[![vladab](https://avatars.githubusercontent.com/u/7256398?v=4)](https://github.com/vladab "vladab (1 commits)")[![pawelhertman](https://avatars.githubusercontent.com/u/1011926?v=4)](https://github.com/pawelhertman "pawelhertman (1 commits)")

### Embed Badge

![Health badge](/badges/phpeek-xsolve-cookie-acknowledgement-bundle/health.svg)

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

###  Alternatives

[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)

PHPackages © 2026

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