Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.

MeltwaterArchive/php-lib-feature

Repository files navigation

Feature Flags

Latest Version on Packagist Software License Build Status Total Downloads

Simple PHP Library to manager feature flags

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require datasift/feature.

"require": {
	"datasift/feature": "1.*"
}

Next, update Composer from the Terminal:

composer update

Drivers

  • Array - Simple array of key value pairs.
  • File - JSON file containing key value pairs.
  • Consul - Using consul key value store.
  • Redis - Using redis key value store.

Usage

$feature = new FeatureManager([
    'driver' => 'file',
    'file' => '<path to json file>'
]);
$feature = new FeatureManager([
    'driver' => 'array',
    'data' => [
        'flag1' => true,
        'flag2' => false
    ]
]);
$feature = new FeatureManager([
    'driver' => 'consul',
    'host' => '127.0.0.1',
    'port' => 8500
]);

Testing

To test the library itself, run the tests:

composer test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Library tool for managing feature flags

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages