qandidate / toggle
Feature toggling for your PHP application.
2.0.3
2026-08-09 20:26 UTC
Requires
- php: ^8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.5
- predis/predis: ^3.5
- symfony/expression-language: ^6.4 || ^7.4 || ^8.0
Suggests
- predis/predis: ^3.5
- symfony/expression-language: ^6.4 || ^7.4 || ^8.0
This package is auto-updated.
Last update: 2026-08-09 20:49:16 UTC
README
Feature toggling for PHP.
About
Read our blog post series about this repository at:
- http://labs.qandidate.com/blog/2014/08/18/a-new-feature-toggling-library-for-php/
- http://labs.qandidate.com/blog/2014/08/19/open-sourcing-our-feature-toggle-api-and-ui/
Installation
Add the library to your project:
$ composer require qandidate/toggle ^1.0
How to use
In the examples folder you'll see the basic usage of the Toggle library.
Basically you create a collection with features, optionally with conditions. Based on a given Context, the manager will tell you if a feature is active or not.
Tests
To run all the tests you'll need to have redis installed (redis tests wil be skipped when not available).
Running the tests:
$ make test
License
MIT, see LICENSE.