[Workflow] use method marking store

This commit is contained in:
Antoine Makdessi 2019-05-19 00:39:11 +02:00 committed by GitHub
parent e606ac1916
commit a2191678b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@
namespace Symfony\Component\Workflow; namespace Symfony\Component\Workflow;
use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface; use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface;
use Symfony\Component\Workflow\MarkingStore\SingleStateMarkingStore; use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
/** /**
@ -22,6 +22,6 @@ class StateMachine extends Workflow
{ {
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed') public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed')
{ {
parent::__construct($definition, $markingStore ?: new SingleStateMarkingStore(), $dispatcher, $name); parent::__construct($definition, $markingStore ?: new MethodMarkingStore(true, 'marking'), $dispatcher, $name);
} }
} }