Simple PHP Library to manager feature flags
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
- 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.
$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
]);
To test the library itself, run the tests:
composer test
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.