This project is not covered by Drupal’s security advisory policy.

Overview

The concept of "Feature Flags" or "Feature Toggles" focuses on a method of changing code execution based on a single point that can be toggled as needed. In some cases this could be as simple as a check box in a site administration screen that is referenced throughout code to determine execution path. An example of this might be to decide whether or not to show a block on the page based on the status of the feature flag on the site being viewed.

The Switches module is a framework to create and manage feature flags, or switches, within an application in a clearly visible and maintainable way. Offering both manually configured override-able switches, and dynamic condition-based switches, this module offers flexible support in numerous scenarios including:

  • Continuous integration/delivery
  • Distribution/platform development and management
  • Beta release of features
  • Premium features
  • QA testing
  • A/B testing

Target Audience

  • Multi-site platforms/distributions
  • Continuous integration release scenarios
  • Environment-specific customizations

Example Use Cases

  • Enable "dev" or "beta" features in non-production environments
  • Release in progress code without it getting executed in production
  • Toggle site features without new deployments
    • Release features separate from releasing code
  • Split and refactor functionality without requiring division by module
    • Functionality can be toggled through flag status rather than enabling/disabling a module

References

Related Modules

Each of these modules implement the same concept, but the long-term architecture intended for this module is fundamentally different from them.

Documentation

Documentation for using and extending the module is available here. All contributions are welcome!

Contributing

All contributions are welcome and appreciated!

If you're interested in seeing where the module is going or jumping in please have look at the issue queue. Some of the prominent tickets to dive into for an overview of things in motion and things to come include:

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • Module categories: Administration Tools, Developer Tools
  • Created by slucero on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases