Skip to content

Commit 691b32a

Browse files
committed
minor #17803 [Workflow] Improve Workflow Documentation (lamasfoker)
This PR was submitted for the 6.2 branch but it was squashed and merged into the 5.4 branch instead. Discussion ---------- [Workflow] Improve Workflow Documentation As you can see on the `MethodMarkingStore` [implementation](https://github.com/symfony/symfony/blob/v6.2.4/src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php#L64-L66), it checks if the `$marking` variable is `null` and not for empty `string` or empty `array`. So I suggest adding these changes to the Docu to declare it out of any doubt. I notice these also on the workflow demo by `@lyrixx`, specifically [here](https://github.com/lyrixx/SFLive-Paris2016-Workflow/blob/master/src/Entity/Article.php#L15-L16) and [here](https://github.com/lyrixx/SFLive-Paris2016-Workflow/blob/master/src/Entity/Task.php#L15-L16). Commits ------- 85ed54b [Workflow] Improve Workflow Documentation
2 parents e7ec633 + 85ed54b commit 691b32a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

workflow.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ The configured property will be used via its implemented getter/setter methods b
194194
preferable to not configure it.
195195

196196
A single state marking store uses a ``string`` to store the data. A multiple
197-
state marking store uses an ``array`` to store the data.
197+
state marking store uses an ``array`` to store the data. On both cases if no
198+
state marking store is defined you have to return ``null``. So in the above
199+
example should be defined a return type like ``App\Entity\BlogPost::getCurrentPlace(): ?array``
200+
or like ``App\Entity\BlogPost::getCurrentPlace(): ?string``.
198201

199202
.. tip::
200203

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy