Skip to content

Commit 7b982c8

Browse files
committed
[Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore
1 parent 18cd342 commit 7b982c8

File tree

5 files changed

+59
-1
lines changed

5 files changed

+59
-1
lines changed

UPGRADE-4.3.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,49 @@ Yaml
110110
----
111111

112112
* Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.
113+
114+
Workflow
115+
--------
116+
117+
* `MultipleStateMarkingStore` is deprecated. Use `MethodMarkingStore` instead.
118+
119+
Before:
120+
```yaml
121+
framework:
122+
workflows:
123+
article:
124+
marking_store:
125+
type: multiple
126+
```
127+
128+
After:
129+
```yaml
130+
framework:
131+
workflows:
132+
article:
133+
marking_store:
134+
type: method
135+
136+
```
137+
138+
* `SingleStateMarkingStore` is deprecated. Use `MethodMarkingStore` instead.
139+
140+
Before:
141+
```yaml
142+
framework:
143+
workflows:
144+
article:
145+
marking_store:
146+
type: single
147+
```
148+
149+
After:
150+
```yaml
151+
framework:
152+
workflows:
153+
article:
154+
marking_store:
155+
type: method
156+
arguments:
157+
- true
158+
```

src/Symfony/Component/Workflow/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ CHANGELOG
44
4.3.0
55
-----
66

7-
* Trigger `entered` event for subject entering in the Workflow for the first time
7+
* Trigger `entered` event for subject entering in the Workflow for the first time.
88
* Added a context to `Workflow::apply()`. The `MethodMarkingStore` could be used to leverage this feature.
9+
* Deprecated the `MultipleStateMarkingStore` class, use the `MethodMarkingStore` instead.
10+
* Deprecated the `SingleStateMarkingStore` class, use the `MethodMarkingStore` instead.
911

1012
4.1.0
1113
-----

src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
*
2020
* This store deals with a "single state" or "multiple state" Marking.
2121
*
22+
* "single state" Marking means a subject can be in one and only one state at
23+
* the same time. Use it with state machine or specific workflow.
24+
*
25+
* "multiple state" Marking means a subject can be in many states at the same
26+
* time. Use it with workflow.
27+
*
2228
* @author Grégoire Pineau <lyrixx@lyrixx.info>
2329
*/
2430
class MethodMarkingStore implements MarkingStoreInterface

src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* This store deals with a "multiple state" Marking. It means a subject can be
2323
* in many states at the same time.
2424
*
25+
* @deprecated since Symfony 4.3. Use MethodMarkingStore instead.
26+
*
2527
* @author Grégoire Pineau <lyrixx@lyrixx.info>
2628
*/
2729
class MultipleStateMarkingStore implements MarkingStoreInterface

src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* This store deals with a "single state" Marking. It means a subject can be in
2222
* one and only one state at the same time.
2323
*
24+
* @deprecated since Symfony 4.3. Use MethodMarkingStore instead.
25+
*
2426
* @author Grégoire Pineau <lyrixx@lyrixx.info>
2527
*/
2628
class SingleStateMarkingStore implements MarkingStoreInterface

0 commit comments

Comments
 (0)