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.4(2mo ago)0151[1 PRs](https://github.com/locomotivemtl/charcoal-contrib-cookie-consent/pulls)MITPHPPHP ^7.4 || ^8.0CI failing

Since Mar 13Pushed 2mo 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 2w ago

READMEChangelog (1)Dependencies (26)Versions (10)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

43

—

FairBetter than 89% of packages

Maintenance85

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

Recently: every ~188 days

Total

8

Last Release

78d 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 (22 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

[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

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

Contao Cookiebar

66132.1k11](/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)

36213.4k1](/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.

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

GDPR compliant cookie bar and consent checker

1511.8k2](/packages/bramdeleeuw-cookieconsent)

PHPackages © 2026

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