Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.26 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.26 KB

Scientist

Scientist for Symfony

Packagist Version Packagist

Allow the Scientist library to be used with Symfony.

Installation

Require the latest version of Scientist Symfony using Composer.

composer require danhanly/scientist-symfony

Register the bundle in your AppKernel.

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new DanHanly\ScientistBundle\ScientistBundle()
        ];
        ...
    }
}

Usage

You can access Scientist from any Container Aware Class.

$scientist = $this->container->get('scientist');

From this point, you can use the library as normal within your processes.

$scientist->experiment('my experiment')
    ->control($controlCallback)
    ->trial('trial name', $trialCallback);

$value = $experiment->run();