PHPackages                             fyre/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fyre/cookie

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

fyre/cookie
===========

A cookie library.

v5.0(7mo ago)0349↓84.6%1MITPHP

Since Nov 29Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/elusivecodes/FyreCookie)[ Packagist](https://packagist.org/packages/fyre/cookie)[ RSS](/packages/fyre-cookie/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (4)Versions (25)Used By (1)

FyreCookie
==========

[](#fyrecookie)

**FyreCookie** is a free, open-source cookie library for *PHP*.

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Methods](#methods)

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

[](#installation)

**Using Composer**

```
composer require fyre/cookie

```

In PHP:

```
use Fyre\Http\Cookie;
```

Basic Usage
-----------

[](#basic-usage)

- `$name` is a string representing the cookie name.
- `$value` is a string representing the cookie value.
- `$options` is an array containing cookie options.
    - `expires` is a number representing the cookie lifetime, and will default to *null*.
    - `domain` is a string representing the cookie domain, and will default to "".
    - `path` is a string representing the cookie path, and will default to "*/*".
    - `secure` is a boolean indicating whether to set a secure cookie, and will default to *false*.
    - `httpOnly` is a boolean indicating whether to the cookie should be HTTP only, and will default to *false*.
    - `sameSite` is a string representing the cookie same site, and will default to "*Lax*".

```
$cookie = new Cookie($name, $value, $options);
```

Methods
-------

[](#methods)

**Get Domain**

Get the cookie domain.

```
$domain = $cookie->getDomain();
```

**Get Expires**

Get the cookie expires timestamp.

```
$expires = $cookie->getExpires();
```

**Get Name**

Get the cookie name.

```
$name = $cookie->getName();
```

**Get Path**

Get the cookie path.

```
$path = $cookie->getPath();
```

**Get Same Site**

Get the cookie same site attribute.

```
$sameSite = $cookie->getSameSite();
```

**Get Value**

Get the cookie value.

```
$value = $cookie->getValue();
```

**Is Expired**

Determine whether the cookie has expired.

```
$expired = $cookie->isExpired();
```

**Is Http Only**

Determine whether the cookie is HTTP only.

```
$httpOnly = $cookie->isHttpOnly();
```

**Is Secure**

Determine whether the cookie is secure.

```
$secure = $cookie->isSecure();
```

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance63

Regular maintenance activity

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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 ~62 days

Recently: every ~32 days

Total

24

Last Release

227d ago

Major Versions

v1.0.5 → v2.02023-07-15

v2.0.2 → v3.02023-08-03

v3.0.5 → v4.02024-10-27

v4.0.7 → v5.02025-11-09

### Community

Maintainers

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

---

Top Contributors

[![elusivecodes](https://avatars.githubusercontent.com/u/18050480?v=4)](https://github.com/elusivecodes "elusivecodes (19 commits)")

---

Tags

cookiephp

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[vladkens/autoprefixer

Run Autoprefixer using node.js in you php.

76338.2k3](/packages/vladkens-autoprefixer)

PHPackages © 2026

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