-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
clarify workflow events #8048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify workflow events #8048
Conversation
|
||
* ``workflow.guard`` | ||
* ``workflow.[workflow name].guard`` | ||
* ``workflow.[workflow name].guard.[transition name]`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i found it illogic that these events are shown below, when they are also events, just a special type of events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, but easy win!
@@ -198,6 +211,14 @@ events are dispatched: | |||
* ``workflow.[workflow name].announce`` | |||
* ``workflow.[workflow name].announce.[transition name]`` | |||
|
|||
When a state transition is initiated, the events are fired in the following order: | |||
|
|||
- guard: Validate whether the transition is allowed at all (see below); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's link the see below part
- leave: The object is about to leave a place; | ||
- transition: The object is going through this transition; | ||
- enter: The object entered a new place. This is the first event where the object' is marked as being in the new place; | ||
- announce: Triggered once for each workflow that now is available for the object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could integrate this with the event list above so it's all in one place. Perhaps the name (guard), then indented below the description, then bullets below that with the 3 events. We do something here https://github.com/symfony/symfony-docs/blob/master/introduction/http_fundamentals.rst for GET POST stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. see #8060 for this. it looks nice, at least in the github preview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I already opened #8059 in the meantime. 🙈
Thank you David. |
This PR was merged into the 3.2 branch. Discussion ---------- clarify workflow events i was a bit confused by what the events exactly mean. after reading through the code and testing some things, this is what i found. Commits ------- 0070621 clarify workflow events
* 3.2: [#8048] some minor tweaks [#8013] revert wrong data provider change correct PHP code Added a missing <script> tag in an example clarify workflow events minor tweak Fix comment to be consistent with the example Reworded the article about slashes in routing placeholders Minor reword of code contribution standards
* 3.4: [#8048] some minor tweaks [#8013] revert wrong data provider change correct PHP code Added a missing <script> tag in an example Fix variable name in CSFR token example code [AUTOWIRE] Fix invalid yaml code clarify workflow events minor tweak Fix comment to be consistent with the example fix invalid code lines and remove extra space Reworded the article about slashes in routing placeholders Minor reword of code contribution standards
…abbuh) This PR was merged into the 3.2 branch. Discussion ---------- [Workflow] rearrange how workflow events are presented see @weaverryan's suggestion in #8048 (comment) Commits ------- f7405d2 rearrange how workflow events are presented
i was a bit confused by what the events exactly mean. after reading through the code and testing some things, this is what i found.