, (*1)
Scientist for Symfony
, (*2)
Allow the Scientist library to be used with Symfony., (*3)
Installation
Require the latest version of Scientist Symfony using Composer., (*4)
composer require danhanly/scientist-symfony
Register the bundle in your AppKernel., (*5)
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
...
new DanHanly\ScientistBundle\ScientistBundle()
];
...
}
}
Usage
You can access Scientist from any Container Aware Class., (*6)
$scientist = $this->container->get('scientist');
From this point, you can use the library as normal within your processes., (*7)
$scientist->experiment('my experiment')
->control($controlCallback)
->trial('trial name', $trialCallback);
$value = $experiment->run();