Download the PHP package landingi/toggle-bundle without Composer
On this page you can find all versions of the php package landingi/toggle-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download landingi/toggle-bundle
More information about landingi/toggle-bundle
Files in landingi/toggle-bundle
Package toggle-bundle
Short Description Bundle with core functionality that gives a hand to check features for a given account
License MIT
Informations about the package toggle-bundle
Toggle bundle
Feature Flag
System for checking whether account has feature flag enabled.
FeatureFlagsSource
implementations:
-
Landingi\ToggleBundle\FeatureFlagsSource\DbSource
- should use Landingi Read Only DB instance to fetch features fromaccounts_features
table by account's UUID and frompackages_features
table by account's package. -
Landingi\ToggleBundle\FeatureFlagsSource\RedisSource
- fetches feature flags list cached in Redis by account's UUID as a key. Landingi\ToggleBundle\FeatureFlagsSource\CachingSource
- this class is an abstraction for caching feature flags list for account.
Configuration
The bundle provides a configuration that allows you to easily control the data access layer. Configuration file should
be created at a path: config/packages/landingi_toggle.yaml
.
Usage
To check feature flag access for a selected account_uuid follow below code snippet:
AccessVoter
is already defined in the symfony dependency injection container, so we can easily use it as a dependency in every service class in the whole project.
All versions of toggle-bundle with dependencies
symfony/framework-bundle Version ^5.2
symfony/uid Version ^5.2
predis/predis Version ^1.1
doctrine/dbal Version ^2.12