Skip to content

Commit a71a233

Browse files
committed
[Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore
1 parent f9d3848 commit a71a233

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

UPGRADE-4.3.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,46 @@ Workflow
140140
{
141141
}
142142
}
143+
144+
* `MultipleStateMarkingStore` is deprecated. Use `MethodMarkingStore` instead.
145+
146+
Before:
147+
```yaml
148+
framework:
149+
workflows:
150+
article:
151+
marking_store:
152+
type: multiple
153+
```
154+
155+
After:
156+
```yaml
157+
framework:
158+
workflows:
159+
article:
160+
marking_store:
161+
type: method
162+
163+
```
164+
165+
* `SingleStateMarkingStore` is deprecated. Use `MethodMarkingStore` instead.
166+
167+
Before:
168+
```yaml
169+
framework:
170+
workflows:
171+
article:
172+
marking_store:
173+
type: single
174+
```
175+
176+
After:
177+
```yaml
178+
framework:
179+
workflows:
180+
article:
181+
marking_store:
182+
type: method
183+
arguments:
184+
- true
143185
```

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)