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

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

markstory/cakephp-feature-flags
===============================

Feature flags plugin for CakePHP

0.1.0(1y ago)83822MITPHPPHP &gt;=8.1

Since Sep 3Pushed 1y ago3 watchersCompare

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

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

FeatureFlags plugin for CakePHP
===============================

[](#featureflags-plugin-for-cakephp)

FeatureFlags is a CakePHP plugin that enables your to use feature flags in your application to enable functionality based on simple application config, or a more complex rule based system.

By using feature flags you can separate your code deployments from what features are enabled, or have different features enabled in different environments. For example, you could have features that are incomplete, enabled in staging environments but disabled in production.

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

[](#installation)

You can install this plugin into your application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require markstory/cakephp-feature-flags

```

Next, load the plugin by running the following command:

```
bin/cake plugin load FeatureFlags

```

Usage
-----

[](#usage)

First you need to decide if you want simple boolean feature flags, or more complex rule based feature flags. For the examples below, we'll assume you have two features (`calendar-v2`, and `checkout-v2`) that you want to conditionally enable.

Simple Feature Flags
--------------------

[](#simple-feature-flags)

First create a configuration file `config/features.php`, with the following:

```
