turbine-kreuzberg/spryker-configcat
最新稳定版本:0.6.0
Composer 安装命令:
composer require turbine-kreuzberg/spryker-configcat
包简介
ConfigCat wrapper for spryker
README 文档
README
This package provides an integration for ConfigCat in Spryker.
Installation
- Install the package via composer
composer require turbine-kreuzberg/spryker-configcat
Configuration
For an easy start, copy the following snippet to your config_local.php
$config[FeatureFlagConstants::SDK_KEY] = 'CONFIG-CAT-KEY'; $config[FeatureFlagConstants::CACHE_REFRESH_INTERVAL] = REFRESH_INTERVAL;
Usage
You can use it as a Client dependency in your bundles.
Example snippet:
$featureFlagClient = $this->getFactory()->getFeatureFlagClient(); if ($featureFlagClient->isFeatureOn('testFeature')) { echo('Feature is on!'); }
Tests
To have feature flag independent of configCat in tests you can set a default value in configFile
$config[FeatureFlagConstants::CONFIG_CAT_FEATURE_FLAGS] = [ 'feature_flag_in_config_file' => true, 'feature flag 2' => false, 'feature flag 3' => true, ];
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 17.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-27