Skip to content

Allow the Scientist library to be used with Symfony

Notifications You must be signed in to change notification settings

danhanly/scientist-symfony

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

Allow the Scientist library to be used with Symfony

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages