2017 © Pedro Peláez
 

library featuretoggle

A PHP Feature Toggle library

image

davispeixoto/featuretoggle

A PHP Feature Toggle library

  • Thursday, August 11, 2016
  • by davispeixoto
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8,160 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

PHP Feature Toggle

This package provides a simple feature toggle mechanism for PHP applications., (*1)

Latest Stable Version Total Downloads Scrutinizer Code Quality Code Coverage Build Status SensioLabsInsight, (*2)

Installation

The package can be installed via Composer by requiring the davispeixoto/featuretoggle package in your project's composer.json., (*3)

{
    "require": {
        "davispeixoto/featuretoggle": "~1.0"
    }
}

And running a composer update from your terminal:, (*4)

php composer.phar update

Configuration

Just put your features into the config file, with their respective state (true or false):, (*5)

return [
    'my_feature' => true,
    'my_other_feature' => [
        'pt_br' => true,
        'en_us' => true,
        'es_es' => false
    ],
    ...
];

Usage

That's it! You're all set to go. Just use:, (*6)

    Davispeixoto\FeatureToggler\FeatureToggler;
    ...

    $toggler = new FeatureToggler('path/to/my_config_file.php');

    if($toggler->isEnabled('my_feature')) {
        // do the feature here
    }

    ...
    // for multidimensional config array
    if($toggler->isEnabled('my_other_feature.en_us')) {
        // new code here
    } else {
        // old code here
    }

License

This software is licensed under the MIT license, (*7)

Versioning

This project follows the Semantic Versioning, (*8)

Thanks

An amazing "Thank you, guys!" for Jetbrains folks, who kindly empower this project with a free open-source license for PhpStorm which can bring a whole new level of joy for coding., (*9)

Jetbrains, (*10)

![PhpStorm][4], (*11)

The Versions

11/08 2016

dev-master

9999999-dev

A PHP Feature Toggle library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Davis Peixoto

feature flag feature switch feature toggle feature flipper conditional feature

11/08 2016

1.0.4

1.0.4.0

A PHP Feature Toggle library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Davis Peixoto

feature flag feature switch feature toggle feature flipper conditional feature

26/10 2015

1.0.3

1.0.3.0

A PHP Feature Toggle library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Davis Peixoto

feature flag feature switch feature toggle feature flipper conditional feature

17/08 2015

1.0.2

1.0.2.0

A PHP Feature Toggle library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Davis Peixoto

feature flag feature switch feature toggle feature flipper conditional feature

17/08 2015

1.0.1

1.0.1.0

A PHP Feature Toggle library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Davis Peixoto

feature flag feature switch feature toggle feature flipper conditional feature

17/08 2015

1.0.0

1.0.0.0

A PHP Feature Toggle library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Davis Peixoto

feature flag feature switch feature toggle feature flipper conditional feature