bug #33815 [Workflow] Fixed default marking store value of Workflow (lyrixx)
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Workflow] Fixed default marking store value of Workflow
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #33749
| License | MIT
| Doc PR |
Commits
-------
a2330b7a90
[Workflow] Fixed default marking store value of Workflow
This commit is contained in:
commit
4a547c5663
@ -22,7 +22,7 @@ use Symfony\Component\Workflow\Exception\LogicException;
|
|||||||
use Symfony\Component\Workflow\Exception\NotEnabledTransitionException;
|
use Symfony\Component\Workflow\Exception\NotEnabledTransitionException;
|
||||||
use Symfony\Component\Workflow\Exception\UndefinedTransitionException;
|
use Symfony\Component\Workflow\Exception\UndefinedTransitionException;
|
||||||
use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface;
|
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\Component\Workflow\Metadata\MetadataStoreInterface;
|
||||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
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')
|
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed')
|
||||||
{
|
{
|
||||||
$this->definition = $definition;
|
$this->definition = $definition;
|
||||||
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
|
$this->markingStore = $markingStore ?: new MethodMarkingStore();
|
||||||
$this->dispatcher = $dispatcher;
|
$this->dispatcher = $dispatcher;
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user