PHPackages                             atlasconsulting/cakephp-cookie-consent - 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. atlasconsulting/cakephp-cookie-consent

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

atlasconsulting/cakephp-cookie-consent
======================================

CookieConsent plugin for CakePHP

v1.0.0(3y ago)93631MITPHPPHP &gt;=7.4

Since May 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/atlasconsulting/cakephp-cookie-consent)[ Packagist](https://packagist.org/packages/atlasconsulting/cakephp-cookie-consent)[ RSS](/packages/atlasconsulting-cakephp-cookie-consent/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

CookieConsent plugin for CakePHP
================================

[](#cookieconsent-plugin-for-cakephp)

[![php](https://github.com/atlasconsulting/cakephp-cookie-consent/actions/workflows/php.yml/badge.svg)](https://github.com/atlasconsulting/cakephp-cookie-consent/actions/workflows/php.yml)[![image](https://camo.githubusercontent.com/17eacf135db4e1230ef3be90ee5966b2cd72eb62d8299658cd9564547cbe8d53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61746c6173636f6e73756c74696e672f63616b657068702d636f6f6b69652d636f6e73656e742e7376673f6c6162656c3d737461626c65)](https://packagist.org/packages/atlasconsulting/cakephp-cookie-consent)[![image](https://camo.githubusercontent.com/e1b61503c9e0e76f538c1d83a1842297b26e8708bc3fde551470cb8de2460fe6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f61746c6173636f6e73756c74696e672f63616b657068702d636f6f6b69652d636f6e73656e742e737667)](https://github.com/atlasconsulting/cakephp-cookie-consent/blob/main/LICENSE.txt)

This plugin helps to remove cookies your app set and on which a user didn't consent. It works reading a configurable cookie that contain information about the categories of cookie accepted by the user. It works out of the box with [Cookie Consent](https://github.com/orestbida/cookieconsent).

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require atlasconsulting/cakephp-cookie-consent

```

Usage
-----

[](#usage)

Add the `CookieCosentMiddleware` to the application middleware queue.

```
public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
{
    return $middlewareQueue
        // Catch any exceptions in the lower layers,
        // and make an error page/response
        ->add(new ErrorHandlerMiddleware(Configure::read('Error')))

        ->add(new CookieConsentMiddleware([
            'remove' => [
                'preferences' => ['lang'], // remove `lang` cookie if `preferences` category isn't accepted
                'analytics' => ['my_analytics'], // remove `my_analytics` cookie if `analytics` category isn't accepted
            ],
        ]));

        // other middlewares here
}
```

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

[](#configuration)

The middleware is configurable with:

```
[
    'cookieName' => 'cc_cookie',
    'searchIn' => 'level',
    'remove' => [
        'preferences' => [],
        'analytics' => [],
        'targeting' => [],
    ],
]
```

where

- `cookieName` (default `cc_cookie`), the cookie consent to analyze
- `searchIn` (default `level`), the key to look for in the json string value of cookie. The value must be an array of cookies' categories accepted by the user, for example `['preferences', 'analytics']`.
- `remove` an array divided by cookie categories that are to remove if not accepted

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1451d ago

### Community

Maintainers

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

---

Top Contributors

[![batopa](https://avatars.githubusercontent.com/u/1306319?v=4)](https://github.com/batopa "batopa (12 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/atlasconsulting-cakephp-cookie-consent/health.svg)

```
[![Health](https://phpackages.com/badges/atlasconsulting-cakephp-cookie-consent/health.svg)](https://phpackages.com/packages/atlasconsulting-cakephp-cookie-consent)
```

###  Alternatives

[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[neos/flow

Flow Application Framework

862.0M449](/packages/neos-flow)[fisharebest/webtrees

webtrees online genealogy

73710.5k9](/packages/fisharebest-webtrees)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[eliashaeussler/typo3-solver

Extension for TYPO3 CMS to extend TYPO3's exception handling with AI generated solutions

292.1k](/packages/eliashaeussler-typo3-solver)

PHPackages © 2026

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