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

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

marcoschwepp/cookie-manager
===========================

Easy management of php cookies

v1.0.0(3y ago)02MITPHPPHP &gt;=7.4.0

Since Oct 13Pushed 3y ago2 watchersCompare

[ Source](https://github.com/marcoschwepp/CookieManager)[ Packagist](https://packagist.org/packages/marcoschwepp/cookie-manager)[ RSS](/packages/marcoschwepp-cookie-manager/feed)WikiDiscussions master Synced 1mo ago

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

PHP-Cookie
==========

[](#php-cookie)

Easy cookie management with php

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4

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

[](#installation)

Run

```
composer require marcoschwepp/CookieManager
```

Usage
-----

[](#usage)

### Create Cookie

[](#create-cookie)

There are two methods to create a new Cookie object.

- Create a new instance of the Cookie class:

```
// only the name is required.
$cookie = new marcoschwepp\Cookie\Cookie('testCookie');

// optional parameters:
$cookie->setValue('123456');
$cookie->setExpiresAt(new \DateTimeImmutable()) // e.g. timestamp now + 24h = \time() + 86400
$cookie->setPath('/');
$cookie->setDomain('.local.de');
$cookie->setSecure(false);
$cookie->setHttpOnly(false);
```

- Create from options array and static method:

```
$options = [
    'name' => 'Test-Cookie',
    'value' => 'Test-Value',
    'expiresAt' => new \DateTimeImmutable,
    'path' => '/',
    'domain' => 'local.de',
    'secure' => true,
    'httpOnly' => true,
];

$cookie = marcoschwepp\Cookie\Cookie::constructFromOptions($options);
```

### Save, Delete, Read

[](#save-delete-read)

```
$cookie->save();
$cookie->delete('testCookie');
$cookie->load();
```

Contributing
------------

[](#contributing)

All contributions are welcome! If you wish to contribute, please create an issue first so that your feature, problem or question can be discussed.

License
-------

[](#license)

This project is licensed under the terms of the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

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

1304d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/243032590033554334c9fab564f450a2136e812aa5dae04280ddefdb3eacf05f?d=identicon)[marcoschwepp](/maintainers/marcoschwepp)

---

Top Contributors

[![marcoschwepp](https://avatars.githubusercontent.com/u/60934267?v=4)](https://github.com/marcoschwepp "marcoschwepp (34 commits)")[![ThemePoint](https://avatars.githubusercontent.com/u/28843201?v=4)](https://github.com/ThemePoint "ThemePoint (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[symfony/rate-limiter

Provides a Token Bucket implementation to rate limit input and output in your application

26847.2M146](/packages/symfony-rate-limiter)[symfony/ldap

Provides a LDAP client for PHP on top of PHP's ldap extension

1407.5M45](/packages/symfony-ldap)[php-soap/ext-soap-engine

An ext-soap engine implementation

443.2M7](/packages/php-soap-ext-soap-engine)[phpbench/container

Simple, configurable, service container.

1512.9M6](/packages/phpbench-container)[symfony/ux-toggle-password

Toggle visibility of password inputs for Symfony Forms

26508.0k5](/packages/symfony-ux-toggle-password)

PHPackages © 2026

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