PHPackages                             locomotivemtl/charcoal-contrib-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. locomotivemtl/charcoal-contrib-cookie-consent

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

locomotivemtl/charcoal-contrib-cookie-consent
=============================================

Charcoal module for cookie consent support useing vanilla-cookieconsent.

1.1.3(1y ago)0108[1 PRs](https://github.com/locomotivemtl/charcoal-contrib-cookie-consent/pulls)MITPHPPHP ^7.4 || ^8.0

Since Mar 13Pushed 5mo ago9 watchersCompare

[ Source](https://github.com/locomotivemtl/charcoal-contrib-cookie-consent)[ Packagist](https://packagist.org/packages/locomotivemtl/charcoal-contrib-cookie-consent)[ Docs](https://locomotivemtl.github.io/charcoal-contrib-cookie-consent/)[ RSS](/packages/locomotivemtl-charcoal-contrib-cookie-consent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (9)Used By (0)

Charcoal Cookie Consent
=======================

[](#charcoal-cookie-consent)

[![License](https://camo.githubusercontent.com/5196680baaaff5b3a6baa181a9573f2138a4a7e027c859a6da6709522586469c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](./LICENSE)[![Latest stable version](https://camo.githubusercontent.com/f1376916e84442d76c87057e0cb07a97fb3e4bb22c65a0217635880ce0621d0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-cookie-consent)[![Supported PHP versions](https://camo.githubusercontent.com/16e04627bbcb2ca08a03ecfc1f4b831af09e33db1fa3a109b7c2a67aee9cbd73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6f6b69652d636f6e73656e743f7374796c653d666c61742d737175617265266c6f676f3d706870)](./composer.json)

The [Charcoal](https://github.com/charcoalphp/charcoal) Cookie Consent package provides an integration with [vanilla-cookieconsent](https://github.com/orestbida/cookieconsent) for a simple cross-browser plugin written in vanilla JS that is configurable from the Admin.

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

[](#installation)

```
composer require locomotivemtl/charcoal-contrib-cookie-consent
```

### Setup

[](#setup)

#### Charcoal Module

[](#charcoal-module)

For Charcoal projects, the module can be registered from your configuration file:

```
{
    "modules": {
        "charcoal/cookie-consent/cookie-consent": {}
    }
}
```

The module will automatically register the service provider, the metadata path, and the [Admin](https://github.com/charcoalphp/admin) dashboard routing.

#### Charcoal Service Provider

[](#charcoal-service-provider)

If you are not using the module, the service provider can be registered from your configuration file:

```
{
    "service_providers": {
        "charcoal/cookie-consent/cookie-consent": {}
    }
}
```

Consult the [package configuration files](./config) for what to add to your project.

Models
------

[](#models)

After the module or service provider has been registered, create the database table for the primary model for configuring and disclosing cookie consent information:

```
./vendor/bin/charcoal admin/object/table/create --obj-type=charcoal/cookie-consent/model/disclosure
./vendor/bin/charcoal admin/object/table/create --obj-type=charcoal/cookie-consent/model/category
```

Service Provider
----------------

[](#service-provider)

### Parameters

[](#parameters)

\--TBD--

### Services

[](#services)

\--TBD--

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

[](#configuration)

If you are using the module, the package can be configured via its module registration:

```
{
    "modules": {
        "charcoal/cookie-consent/cookie-consent": {
            // See available options below.
        }
    }
}
```

Alternatively, it can be configured via your application configuration:

```
{
    "cookie_consent": {
        // See available options below.
    }
}
```

Usage
-----

[](#usage)

\--TBD--

Credits
-------

[](#credits)

- [Locomotive](https://locomotive.ca/)

License
-------

[](#license)

Charcoal is licensed under the [MIT license](./LICENSE).

Resources
---------

[](#resources)

- [Contributing](./CONTRIBUTING.md)
- [Report issues](https://github.com/locomotivemtl/charcoal-contrib-cookie-consent/issues) and [send pull requests](https://github.com/locomotivemtl/charcoal-contrib-cookie-consent/pulls)in the [main Charcoal repository](https://github.com/charcoalphp/charcoal)

---

🚂

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance58

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~50 days

Recently: every ~72 days

Total

7

Last Release

490d ago

### Community

Maintainers

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

---

Top Contributors

[![JoelAlphonso](https://avatars.githubusercontent.com/u/10762266?v=4)](https://github.com/JoelAlphonso "JoelAlphonso (21 commits)")[![mcaskill](https://avatars.githubusercontent.com/u/29353?v=4)](https://github.com/mcaskill "mcaskill (18 commits)")[![veve40](https://avatars.githubusercontent.com/u/7537381?v=4)](https://github.com/veve40 "veve40 (3 commits)")

---

Tags

cookiecharcoalcontribconsent

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/locomotivemtl-charcoal-contrib-cookie-consent/health.svg)

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

###  Alternatives

[statikbe/laravel-cookie-consent

Cookie consent modal for EU

213396.7k](/packages/statikbe-laravel-cookie-consent)[oveleon/contao-cookiebar

Contao Cookiebar

63124.1k6](/packages/oveleon-contao-cookiebar)[dirkpersky/typo3-dp_cookieconsent

Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)

36201.3k1](/packages/dirkpersky-typo3-dp-cookieconsent)[codingfreaks/cf-cookiemanager

Manage cookies, scripts, and GDPR compliance on your Typo3 website with CodingFreaks Typo3 Cookie Manager. Customize cookie banners, streamline workflow, and enhance user experience. Ensure GDPR compliance and take control of cookie management with our Typo3 cookie management extension. Visit the official Typo3 Documentation page to learn more.

1625.8k](/packages/codingfreaks-cf-cookiemanager)[bramdeleeuw/cookieconsent

GDPR compliant cookie bar and consent checker

1511.5k2](/packages/bramdeleeuw-cookieconsent)

PHPackages © 2026

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