danhanly / scientist-symfony
Integrates Scientist into Symfony
Installs: 71 668
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 0
Forks: 1
Open Issues: 0
Requires
- daylerees/scientist: ~1.0
- symfony/dependency-injection: ~2.3|~3.0
- symfony/framework-bundle: ~2.3|~3.0
Requires (Dev)
- symfony/phpunit-bridge: ~2.7|~3.0
This package is not auto-updated.
Last update: 2024-11-01 17:54:36 UTC
README
Scientist for Symfony
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();