PHPackages                             worksome/feature-flags - 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. worksome/feature-flags

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

worksome/feature-flags
======================

A package to manage feature flags in your application

v5.1.0(2mo ago)11506.3k↓28.1%[2 PRs](https://github.com/worksome/feature-flags/pulls)MITPHPPHP ^8.4CI passing

Since Dec 10Pushed 2mo ago12 watchersCompare

[ Source](https://github.com/worksome/feature-flags)[ Packagist](https://packagist.org/packages/worksome/feature-flags)[ Docs](https://github.com/worksome/feature-flags)[ GitHub Sponsors](https://github.com/worksome)[ RSS](/packages/worksome-feature-flags/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (33)Used By (0)

Feature Flags
=============

[](#feature-flags)

[![PHPStan](https://github.com/worksome/feature-flags/actions/workflows/phpstan.yml/badge.svg)](https://github.com/worksome/feature-flags/actions/workflows/phpstan.yml)[![Run Tests](https://github.com/worksome/feature-flags/actions/workflows/run-tests.yml/badge.svg)](https://github.com/worksome/feature-flags/actions/workflows/run-tests.yml)

A package to manage feature flags in your application. Currently supporting these providers:

- [LaunchDarkly](https://launchdarkly.com)
- [Reflag](https://reflag.com)

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

[](#installation)

You can install the package via composer:

```
composer require worksome/feature-flags
```

You can publish the config file with:

```
php artisan vendor:publish --tag="feature-flags-config"
```

See the [config file](config/feature-flags.php) for more information.

### Creating Feature Flags

[](#creating-feature-flags)

Feature flags should be registered using one or more enums containing your feature flags.

All feature flag enums must implement the `Worksome\FeatureFlags\Contracts\FeatureFlagEnum` contract.

For example, if you had a feature flag called `flag-one`, you could create an enum with the following:

```
namespace App\Enums;

enum FeatureFlag: string implements \Worksome\FeatureFlags\Contracts\FeatureFlagEnum
{
    case FlagOne = 'flag-one';
}
```

Usage in Blade
--------------

[](#usage-in-blade)

```
@feature(\App\Enums\FeatureFlag::FlagOne)
    This is content under a feature flag.
@endfeature
```

Changelog
---------

[](#changelog)

Please see the [Releases](https://github.com/worksome/feature-flags/releases) for more information on what has changed recently.

Testing
-------

[](#testing)

We pride ourselves on a thorough test suite and strict static analysis. You can run all of our checks via a composer script:

```
composer test
```

To make it incredibly easy to contribute, we also provide a docker-compose file that will spin up a container with all the necessary dependencies installed. Assuming you have docker installed, just run:

```
docker-compose run --rm composer install # Only needed the first time
docker-compose run --rm composer test # Run tests and static analysis
```

Support for XDebug is baked into the Docker image, you just need to configure the `XDEBUG_MODE` environment variable:

```
docker-compose run --rm -e XDEBUG_MODE=debug php
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Lukas Juhas](https://github.com/lukasjuhas)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~131 days

Total

28

Last Release

75d ago

Major Versions

1.4.0 → 2.0.02022-10-25

2.0.2 → 3.0.02022-11-25

3.3.1 → 4.0.02024-06-19

v4.2.0 → v5.0.02025-09-26

PHP version history (5 changes)1.0.0PHP ^8.0|^8.1

3.0.0PHP ^8.1

3.0.1PHP ^8.2

v4.1.0PHP ^8.3

v5.1.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1899334?v=4)[Owen Voke](/maintainers/owenvoke)[@owenvoke](https://github.com/owenvoke)

![](https://avatars.githubusercontent.com/u/5870441?v=4)[Oliver Nybroe](/maintainers/olivernybroe)[@olivernybroe](https://github.com/olivernybroe)

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

---

Top Contributors

[![lukasjuhas](https://avatars.githubusercontent.com/u/5247674?v=4)](https://github.com/lukasjuhas "lukasjuhas (68 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (38 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (33 commits)")[![lukeraymonddowning](https://avatars.githubusercontent.com/u/12202279?v=4)](https://github.com/lukeraymonddowning "lukeraymonddowning (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (7 commits)")[![jeremynikolic](https://avatars.githubusercontent.com/u/4478969?v=4)](https://github.com/jeremynikolic "jeremynikolic (6 commits)")[![olivernybroe](https://avatars.githubusercontent.com/u/5870441?v=4)](https://github.com/olivernybroe "olivernybroe (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![odinns](https://avatars.githubusercontent.com/u/10807424?v=4)](https://github.com/odinns "odinns (1 commits)")

---

Tags

feature-flagslaravellaunchdarklylaravelfeature-flagsworksome

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/worksome-feature-flags/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[maestroerror/laragent

Power of AI Agents in your Laravel project

630106.4k](/packages/maestroerror-laragent)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[spatie/laravel-rdap

Perform RDAP queries in a Laravel app

72108.3k2](/packages/spatie-laravel-rdap)

PHPackages © 2026

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