dvnc0/buoy

Small feature flag management library for PHP applications

v1.0.1 2024-10-22 05:17 UTC

This package is auto-updated.

Last update: 2024-10-22 05:18:11 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 probablity function:

Buoy::lotto(50); // true 50% of the time

Feature Validators

The register method can take callables, objects that use the __invoke magic method, or a class that implements the Buoy\Feature_Validator interface.