8000 [Workflow] Removed note about flushing in `entered` event by lyrixx · Pull Request #12413 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Workflow] Removed note about flushing in entered event #12413

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

Merged
merged 1 commit into from
Oct 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Workflow] Removed note about flushing in entered event
This sentence is confusing and lead to bad practices:

* It's not a good idea to flush in the model layer
* It can lead to many calls to `flush()` method if the user uses a workflow (with many `to` places after a transition)
* It's not possible to "preview" what a transition do, because everything is flushed in the DB
  • Loading branch information
lyrixx authored Oct 3, 2019
commit d7511a1d162e9499c9f9a4cd82c864cf83432941
3 changes: 1 addition & 2 deletions workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ order:
* ``workflow.[workflow name].enter.[place name]``

``workflow.entered``
The subject has entered in the places and the marking is updated (making it a good
place to flush data in Doctrine).
The subject has entered in the places and the marking is updated.

The three events being dispatched are:

Expand Down
0