@@ -60,7 +60,7 @@ follows:
60
60
supports :
61
61
- App\Entity\BlogPost
62
62
initial_marking : draft
63
- places :
63
+ places : # defining places manually is optional
64
64
- draft
65
65
- reviewed
66
66
- rejected
@@ -97,10 +97,13 @@ follows:
97
97
</framework : marking-store >
98
98
<framework : support >App\Entity\BlogPost</framework : support >
99
99
<framework : initial-marking >draft</framework : initial-marking >
100
+
101
+ <!-- defining places manually is optional -->
100
102
<framework : place >draft</framework : place >
101
103
<framework : place >reviewed</framework : place >
102
104
<framework : place >rejected</framework : place >
103
105
<framework : place >published</framework : place >
106
+
104
107
<framework : transition name =" to_review" >
105
108
<framework : from >draft</framework : from >
106
109
<framework : to >reviewed</framework : to >
@@ -135,6 +138,7 @@ follows:
135
138
->type('method')
136
139
->property('currentPlace');
137
140
141
+ // defining places manually is optional
138
142
$blogPublishing->place()->name('draft');
139
143
$blogPublishing->place()->name('reviewed');
140
144
$blogPublishing->place()->name('rejected');
@@ -168,6 +172,17 @@ follows:
168
172
``'draft' `` or ``!php/const App\Entity\BlogPost::TRANSITION_TO_REVIEW ``
169
173
instead of ``'to_review' ``.
170
174
175
+ .. tip ::
176
+
177
+ You can omit the ``places `` option if your transitions define all the places
178
+ that are used in the workflow. Symfony will automatically extract the places
179
+ from the transitions.
180
+
181
+ .. versionadded :: 7.1
182
+
183
+ The support for omitting the ``places `` option was introduced in
184
+ Symfony 7.1.
185
+
171
186
The configured property will be used via its implemented getter/setter methods by the marking store::
172
187
173
188
// src/Entity/BlogPost.php
0 commit comments