for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sebdesign\SM\Services;
use SM\Event\TransitionEvent;
class StateHistoryManager
{
public function storeHistory(TransitionEvent $event)
$sm = $event->getStateMachine();
$model = $sm->getObject();
$model->addHistoryLine([
"transition" => $event->getTransition(),
"to" => $sm->getState()
]);
}