qandidate / toggle
Feature toggling for your PHP application.
Installs: 1 700 335
Dependents: 11
Suggesters: 1
Security: 0
Stars: 381
Watchers: 23
Forks: 37
Open Issues: 4
Requires
- php: >=7.2
Requires (Dev)
- broadway/coding-standard: ^1.2
- phpstan/phpstan: @stable
- phpunit/phpunit: ^9.5
- predis/predis: ^1.1||^2.0
- symfony/expression-language: ^3.4||^4.4||^5.0
Suggests
- predis/predis: To use the PredisCollection to persist toggles in redis
- symfony/expression-language: To use the ExpressionCondition to add conditions as a symfony language expression
This package is auto-updated.
Last update: 2024-11-07 03:47:47 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.