[Workflow] Fixed default marking store value of Workflow

This commit is contained in:
Grégoire Pineau 2019-10-02 17:57:26 +02:00
parent 3ee9dbd17b
commit a2330b7a90

View File

@ -22,7 +22,7 @@ use Symfony\Component\Workflow\Exception\LogicException;
use Symfony\Component\Workflow\Exception\NotEnabledTransitionException;
use Symfony\Component\Workflow\Exception\UndefinedTransitionException;
use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface;
use Symfony\Component\Workflow\MarkingStore\MultipleStateMarkingStore;
use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore;
use Symfony\Component\Workflow\Metadata\MetadataStoreInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
@ -41,7 +41,7 @@ class Workflow implements WorkflowInterface
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed')
{
$this->definition = $definition;
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
$this->markingStore = $markingStore ?: new MethodMarkingStore();
$this->dispatcher = $dispatcher;
$this->name = $name;
}