2017 © Pedro Peláez
 

symfony-bundle flagception-bundle

Feature toggle bundle on steroids.

image

flagception/flagception-bundle

Feature toggle bundle on steroids.

  • Friday, July 13, 2018
  • by bestit
  • Repository
  • 6 Watchers
  • 23 Stars
  • 12,445 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 18 Versions
  • 239 % Grown

The README.md

Flagception

Feature toggle bundle on steroids! Flagception is a simple and powerful feature toggle system for php. This bundle integrates the Flagception PHP Libary for symfony 2.7 to 5. (and php 5.6 to php7.)., (*1)

Latest Stable Version Coverage Status Build Status Total Downloads License, (*2)

SensioLabsInsight, (*3)

Bundle Version (Tag) Support Symfony Branch
<=3 2.7 - 4.4 3.x
>=4 4.4 - current master
$ composer require flagception/flagception-bundle

Documentation

Quick example

Set some feature in your config (or use your own activator for fetching features from wherever you want) ..., (*4)

flagception:

    # Your Features (optional you left it empty)
    features:

        # Feature name as key
        feature_123:
            # Default flag if inactive or active (default: false)
            default: true

        # Feature state from an environment variable
        feature_abc:
            env: FEATURE_ENV_ABC

        # Feature with constraint (active if user id is 12 OR it is between 8 am and 6 pm)
        feature_def:
            constraint: 'user_id == 12 or (date("H") > 8 and date("H") < 18)'

        # All togther (chain)
        feature_def:
            default: false
            env: FEATURE_ENV_ABC
            constraint: 'user_id == 12 or (date("H") > 8 and date("H") < 18)'

... and use it in controller, services or twig:, (*5)

{% if feature('feature_123') %}
    {# Execute if feature is active ... #}
{% endif %}

See usage documentation for detailed examples., (*6)

Profiler

This bundle ships a profiler tab, where you can see how often a feature was requested, which results it returns (active or inactive) and the given context., (*7)

Image of Profiler, (*8)

Credits

Profiler icon from https://github.com/ionic-team/ionicons, (*9)

The Versions

13/07 2018

dev-feature/add-database-configurator

dev-feature/add-database-configurator

Feature toggle bundle on steroids.

  Sources   Download

MIT

The Requires

 

The Development Requires

testing bundle symfony flags feature feature-flags toggle rollout feature-toggle flagception

08/02 2018

dev-bugfix/features-config-optional

dev-bugfix/features-config-optional

Feature toggle bundle on steroids.

  Sources   Download

MIT

The Requires

 

The Development Requires

testing bundle symfony flags feature feature-flags toggle rollout feature-toggle flagception

06/02 2018
05/02 2018