PHPackages                             abrouter/symfony-abtest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abrouter/symfony-abtest

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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.

0.1.0(3y ago)2271[1 PRs](https://github.com/abrouter/symfony-abtest/pulls)MITPHPPHP ^7.4 || ^8.0

Since Jan 3Pushed 3y agoCompare

[ Source](https://github.com/abrouter/symfony-abtest)[ Packagist](https://packagist.org/packages/abrouter/symfony-abtest)[ RSS](/packages/abrouter-symfony-abtest/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

ABRouter Symfony A/B Tests | Split Tests
========================================

[](#abrouter-symfony-ab-tests--split-tests)

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

You're welcome to [visit the docs](https://docs.abrouter.com/docs/intro/).

What is the ABRouter service ?
==============================

[](#what-is-the-abrouter-service-)

[ABRouter](https://abrouter.com) 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
---------------------------

[](#prepare-your-first-ab-test)

Besides of the installing this package you need to have an account on [ABRouter](https://abrouter.com). Your token and experiment id will be also there.

📦 Install
---------

[](#package-install)

Via composer

```
$ composer require abrouter/symfony-abtest
```

Register the bundle
-------------------

[](#register-the-bundle)

Register bundle

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

```

### Configure ABRouter client:

[](#configure-abrouter-client)

Put your ABRouter token in /config/packages/abrouter\_client.yaml. You can find this token in [ABRouter dashboard](https://abrouter.com/en/board).

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

🚀 Usage
-------

[](#rocket-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](https://abrouter.com) or just read the [docs](https://abrouter.com/en/docs).

Example
-------

[](#example)

You can get an dockerized usage example by the following link: ()

🔧 Contributing
--------------

[](#wrench-contributing)

Please feel free to fork and sending Pull Requests. This project follows [Semantic Versioning 2](http://semver.org) and [PSR-2](http://www.php-fig.org/psr/psr-2/).

📄 License
---------

[](#page_facing_up-license)

GPL3. Please see [License File](LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~76 days

Total

3

Last Release

1438d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad0f1605c66c687e2d6ea20e1fc0569e7c46c3a34eaf3a3ae56d6c0b178c29df?d=identicon)[abrouter](/maintainers/abrouter)

---

Top Contributors

[![yatsenkolesh](https://avatars.githubusercontent.com/u/20239433?v=4)](https://github.com/yatsenkolesh "yatsenkolesh (10 commits)")[![Omelya](https://avatars.githubusercontent.com/u/82599515?v=4)](https://github.com/Omelya "Omelya (3 commits)")

---

Tags

a-b-testingab-testing-phpexperimentsfeature-flagsphpphp-ab-testingstatisticssymfonytracking-funnel

### Embed Badge

![Health badge](/badges/abrouter-symfony-abtest/health.svg)

```
[![Health](https://phpackages.com/badges/abrouter-symfony-abtest/health.svg)](https://phpackages.com/packages/abrouter-symfony-abtest)
```

###  Alternatives

[winzou/state-machine-bundle

Bundle for the very lightweight yet powerful PHP state machine

34010.4M15](/packages/winzou-state-machine-bundle)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[sylius/taxonomy-bundle

Flexible categorization system for Symfony.

26388.2k7](/packages/sylius-taxonomy-bundle)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[sylius/addressing-bundle

Addressing and zone management for Symfony applications.

33221.4k3](/packages/sylius-addressing-bundle)[sylius/inventory-bundle

Flexible inventory management for Symfony applications.

19176.7k4](/packages/sylius-inventory-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
