dvnc0 / buoy
Small feature flag management library for PHP applications
v1.2.0
2024-12-28 07:11 UTC
Requires
- php: >=8.2
Requires (Dev)
- phpstan/phpstan: >1.8
- phpunit/php-code-coverage: >9.2
- phpunit/phpunit: >11
- squizlabs/php_codesniffer: >3.7
This package is auto-updated.
Last update: 2025-04-28 07:57:59 UTC
README
A small PHP Feature Flag library.
composer require dvnc0/buoy
Usage
use Buoy; Buoy::init(); Buoy::register('feature', function() { return true; }); Buoy::can()->access('feature'); // true
This also includes a probability function:
Buoy::lotto(50); // true 50% of the time
Feature Validators
The register method can take a callable or a class that implements the Buoy\Feature_Validator
interface.