PHPackages                             coercive/cookie - 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. coercive/cookie

ActiveLibrary

coercive/cookie
===============

Coercive Security Cookie

1.1.4(4y ago)01.6k1MITPHP &gt;=7

Since Jul 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Coercive/Cookie)[ Packagist](https://packagist.org/packages/coercive/cookie)[ Docs](http://coercive.fr)[ RSS](/packages/coercive-cookie/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (1)

Coercive Security Cookie
========================

[](#coercive-security-cookie)

Cookie allows you to create / read / delete normal or encrypted cookies.

Get
---

[](#get)

```
composer require coercive/cookie

```

Usage
-----

[](#usage)

```
use Coercive\Security\Cookie\Cookie;

# No need to reload the document.
# The Cookie class creates and deletes cookies also in the super global $_COOKIE.

# Instantiate and set your options
$cookie = new Cookie;
$cookie->setPath('/');
$cookie->setDomain('.domain.extension');
// etc...

# Option : anonymise -> cookie names are now sha1 + salt
$cookie->anonymize(true, 'abcd1234');
# You can prefix anonymised cookie : Hello_*************
$cookie->anonymize(true, 'abcd1234', 'Hello_');

# Plain cookie
$cookie->set('MyCookie', 'Hey ! This is an example cookie !', time() + 600);
$var = $cookie->get('MyCookie');

# Crypted cookie
$cookie = new Cookie('My Password');
$cookie->setSafe('MyCookie', 'Hey ! This is an example cookie !', time() + 600);
$var = $cookie->getSafe('MyCookie');

# Delete cookie
$cookie->delete('MyCookie');
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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

Every ~299 days

Recently: every ~292 days

Total

7

Last Release

1797d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

1.1.0PHP &gt;=7.1

1.1.2PHP &gt;=7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20288080?v=4)[Coercive](/maintainers/Coercive)[@Coercive](https://github.com/Coercive)

---

Top Contributors

[![Coercive](https://avatars.githubusercontent.com/u/20288080?v=4)](https://github.com/Coercive "Coercive (3 commits)")

### Embed Badge

![Health badge](/badges/coercive-cookie/health.svg)

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

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.7k3.7M389](/packages/pimcore-pimcore)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[spiral/framework

Spiral, High-Performance PHP/Go Framework

2.0k1.8M57](/packages/spiral-framework)[voku/stringy

A string manipulation library with multibyte support

1783.8M19](/packages/voku-stringy)[kunstmaan/bundles-cms

The Kunstmaan CMS is an advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.

411285.2k19](/packages/kunstmaan-bundles-cms)

PHPackages © 2026

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