Skip to content

Commit 01b6afe

Browse files
committed
[Workfow] Rename current MarkingStore
* ScalarMarkingStore -> SingleStateMarkingStore * PropertyAccessorMarkingStore -> MultipleStateMarkingStore And I also made optionnal the `marking_store` config, to let the componant choose the best marking store depending on the type (state_machine or workflow).
1 parent 2ee1307 commit 01b6afe

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,9 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
241241
->defaultValue('workflow')
242242
->end()
243243
->arrayNode('marking_store')
244-
->isRequired()
245244
->children()
246245
->enumNode('type')
247-
->values(array('property_accessor', 'scalar'))
246+
->values(array('multiple_state', 'single_state'))
248247
->end()
249248
->arrayNode('arguments')
250249
->beforeNormalization()

Resources/config/workflow.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<argument /> <!-- name -->
1919
</service>
2020

21-
<service id="workflow.marking_store.property_accessor" class="Symfony\Component\Workflow\MarkingStore\PropertyAccessorMarkingStore" abstract="true" />
22-
<service id="workflow.marking_store.scalar" class="Symfony\Component\Workflow\MarkingStore\ScalarMarkingStore" abstract="true" />
21+
<service id="workflow.marking_store.multiple_state" class="Symfony\Component\Workflow\MarkingStore\MultipleStateMarkingStore" abstract="true" />
22+
<service id="workflow.marking_store.single_state" class="Symfony\Component\Workflow\MarkingStore\SingleStateMarkingStore" abstract="true" />
2323

2424
<service id="workflow.registry" class="Symfony\Component\Workflow\Registry" />
2525

Tests/DependencyInjection/Fixtures/php/workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'workflows' => array(
77
'my_workflow' => array(
88
'marking_store' => array(
9-
'type' => 'property_accessor',
9+
'type' => 'multiple_state',
1010
),
1111
'supports' => array(
1212
FrameworkExtensionTest::class,

Tests/DependencyInjection/Fixtures/xml/workflow.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<framework:workflows>
1111
<framework:workflow name="my_workflow">
1212
<framework:marking-store>
13-
<framework:type>property_accessor</framework:type>
13+
<framework:type>multiple_state</framework:type>
1414
<framework:arguments>a</framework:arguments>
1515
<framework:arguments>a</framework:arguments>
1616
</framework:marking-store>

Tests/DependencyInjection/Fixtures/yml/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ framework:
22
workflows:
33
my_workflow:
44
marking_store:
5-
type: property_accessor
5+
type: multiple_state
66
supports:
77
- Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest
88
places:

0 commit comments

Comments
 (0)