PHPackages                             clsmedia/feature-flag - 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. clsmedia/feature-flag

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

clsmedia/feature-flag
=====================

Set feature flag via .env or cookies

v1.0.2(2y ago)0511MITPHP

Since Apr 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/clsmedia/feature-flag)[ Packagist](https://packagist.org/packages/clsmedia/feature-flag)[ RSS](/packages/clsmedia-feature-flag/feed)WikiDiscussions master Synced 1mo ago

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

clsmedia\\feature-flag
======================

[](#clsmediafeature-flag)

A simple package to handle feature-flags via .env or cookie.

Define via .env
---------------

[](#define-via-env)

If you are using .env then just define a list of your Feature Flags

```
FEATURE_FLAGS='feature1,feature2'

```

Define via cookie
-----------------

[](#define-via-cookie)

You can also define a list of Feature Flags in a cookie:

```
FEATURE_FLAGS='feature1,feature2'

```

Usage
-----

[](#usage)

`FeatureFlag::isActive('feature1')` returns `true` if it finds the environment variable `FEATURE_FLAGS='feature1'` or when the cookie `FEATURE_FLAGS='feature1'` is set.

see `index.php` for an example

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

3

Last Release

865d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90e846ed94f3caefd49bcc40d47f916ed0adeb00f474e3e7505148884dcd3f4c?d=identicon)[clsmedia](/maintainers/clsmedia)

---

Top Contributors

[![clsmedia](https://avatars.githubusercontent.com/u/9933752?v=4)](https://github.com/clsmedia "clsmedia (5 commits)")

---

Tags

cookieenvfeature-flagfeature-flagsfeature-togglefeature-togglesfeaturesflagsphptogglephpfeatureflagfeature toggletogglefeature flag

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clsmedia-feature-flag/health.svg)

```
[![Health](https://phpackages.com/badges/clsmedia-feature-flag/health.svg)](https://phpackages.com/packages/clsmedia-feature-flag)
```

###  Alternatives

[opensoft/rollout

Feature switches or flags for PHP

2571.8M5](/packages/opensoft-rollout)[zumba/swivel

Strategy driven feature toggles

209135.7k5](/packages/zumba-swivel)[flagception/flagception-bundle

Feature toggle bundle on steroids.

283.8M](/packages/flagception-flagception-bundle)[francescomalatesta/laravel-feature

A simple package to manage feature flagging in a Laravel project.

211206.4k](/packages/francescomalatesta-laravel-feature)[ajgarlag/feature-flag-bundle

Provides a feature flag mechanism

1417.8k](/packages/ajgarlag-feature-flag-bundle)[novaway/feature-flag-bundle

Very KISS bundle to manage features flag

24278.1k](/packages/novaway-feature-flag-bundle)

PHPackages © 2026

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