定制 abrouter/symfony-abtest 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abrouter/symfony-abtest

Composer 安装命令:

composer require abrouter/symfony-abtest

包简介

ABRouter Symfony AB test is a simple package for the base library to run ab-tests via ABRouter with Symfony. Prepare and run your ab-test in 10 minutes. Easy to manage and run. Can be also used as a feature flag or feature toggle. Available for free.

README 文档

README

ABRouter AB Test 👷‍♀️ is a simple package for base library to run A/B tests via ABRouter with Symfony. You can find base PHP library in https://github.com/abrouter/abrouter-php-client

You're welcome to visit the docs.

What is the ABRouter service ?

ABRouter is the service to manage experiments(A/B split tests). The service provides easy to manage dashboard to keep experiments under control. There you can create experiments, branches and set a percentage for every branch. Then, when you're running an ab-test on PHP you will receive a perfect branch-wise response that following the rules, that you set up.

Can be also used as a feature flag or feature toggle. Available for free.

Prepare your first A/B test

Besides of the installing this package you need to have an account on ABRouter. Your token and experiment id will be also there.

📦 Install

Via composer

$ composer require abrouter/symfony-abtest

Register the bundle

Register bundle

// config/bundles.php
return [
    // [...]
    Abrouter\SymfonyClient\AbrouterClientBundle::class => ['all' => true],
];

Configure ABRouter client:

Put your ABRouter token in /config/packages/abrouter_client.yaml. You can find this token in ABRouter dashboard.

abrouter_client:
  token:                'YOUR_TOKEN'
  host:                 'https://abrouter.com'

🚀 Usage

use Abrouter\Client\Client;

class ExampleController
{
    public function __invoke(Client $client)
    {
        $buttonColorExperimentId = 'D1D06000-0000-0000-00005030';
        return new Response(json_encode([
            'button_color' => $client
                ->experiments()
                ->run('USER_ID', $buttonColorExperimentId),
        ]));
    }
}

You can create an experiment and get your token and id of experiment on ABRouter or just read the docs.

Example

You can get an dockerized usage example by the following link: (https://github.com/abrouter/symfony-abtest-example)

🔧 Contributing

Please feel free to fork and sending Pull Requests. This project follows Semantic Versioning 2 and PSR-2.

📄 License

GPL3. Please see License File for more information.

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固