Download the PHP package e0ipso/feature_flags without Composer

On this page you can find all versions of the php package e0ipso/feature_flags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package feature_flags

Feature Flags

Client-side feature flags that work with Varnish, CDN, and BigPipe. Resolve variants in JavaScript, not PHP.

Drupal PHP


What This Module Does

Create feature flags with multiple variants. Configure percentage rollouts and conditions. Everything resolves client-side so your page cache stays fast.

Perfect for high-traffic sites using aggressive caching (Varnish, CDN, BigPipe).

Pairs beautifully with ab_tests for A/B testing with metrics.


See It In Action

Video Walkthrough

coin-flip-demo.webm

👆 30-second walkthrough showing the complete setup and resolution process

Step-by-Step with Screenshots

1. Enable Settings (Debug + Persistence)

Enable debug mode to see resolution in console. Enable persistence to cache decisions in localStorage.

2. Create Your Feature Flag

Define basic info: label, machine name, description.

3. Add Variants (Minimum 2, JSON Values)

Each variant has a label and JSON value. CodeMirror editor included.

Example: "Heads, Tails, or Edge" coin flip

4. Configure Percentage Rollout

48% Heads, 48% Tails, 4% Edge. Percentages must sum to 100%.

5. Resolve in JavaScript

Console Output:

Debug mode shows the full resolution process. Result is cached in localStorage for consistency.


Installation


Core Concepts

Variants

Each flag has 2 or more variants with JSON values. Think of variants as the possible outcomes.

Algorithms

Algorithms decide which variant a user gets. The Percentage Rollout algorithm distributes users by percentage (e.g., 25% variant A, 75% variant B).

How to create a custom algorithm 1. **PHP Plugin**: `src/Plugin/DecisionAlgorithm/MyAlgorithm.php` - Extends `DecisionAlgorithmPluginBase` - Defines admin configuration form - Returns JavaScript settings 2. **JavaScript Class**: `js/algorithm/MyAlgorithm.js` - Extends `BaseAlgorithm` - Implements `decide(context)` method - Returns selected variant 3. **Library**: Add to `feature_flags.libraries.yml`

Conditions

Conditions filter when an algorithm applies. Target specific users, or custom context.

Built-in conditions:

How to provide custom context Listen to the `featureFlags:provideContext` event: Then create conditions that evaluate your custom context:

Use With ab_tests for A/B Testing

The feature_flags module controls rollout. The ab_tests module tracks metrics.

Example: Progressive checkout rollout with conversion tracking

When to use each:

Need Use Why
Gradual rollout (10% → 50% → 100%) feature_flags Percentage control
Track metrics & conversions ab_tests Analytics
Experiment + rollout Both together Best of both worlds

Requirements


Testing

Test Commands

Documentation


License

GPL v2 or later


All versions of feature_flags with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package e0ipso/feature_flags contains the following files

Loading the files please wait ...