datasift / feature
This package is abandoned and no longer maintained.
No replacement package was suggested.
Library tool for managing feature flags
dev-master / 1.x-dev
2016-05-18 12:22 UTC
Requires
- php: >=5.3
- symfony/options-resolver: ^2.0
Requires (Dev)
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ^4.0|^5.0
Suggests
- predis/predis: Redis driver
- sensiolabs/consul-php-sdk: Consul driver
This package is not auto-updated.
Last update: 2023-12-05 17:32:06 UTC
README
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.