Skip to content
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

Add section for Messenger integration #637

Merged
merged 1 commit into from Jun 4, 2020

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Jun 3, 2020

Closes #634

@malarzm malarzm added this to the 4.2.0 milestone Jun 3, 2020
@malarzm malarzm added this to 4.2 in Roadmap Jun 3, 2020
@@ -0,0 +1,11 @@
Messenger integration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize "Integration" since this is a title.


.. note::

The middleware is available when using Symfony 4.4 or newer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's work this into the previous paragraph.

When using Symfony 4.4 or later, the bundle automatically registers...

=====================

The bundle automatically registers a `Messenger`_ middleware that clears
document managers between messages being handled to avoid outdated data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

...that clears all document managers after handling messages, which helps to isolate each handler and guard against reading out-of-date document data.

I summarized that from @weaverryan's explanation in symfony/symfony#34156. You could also considering adding a link to the issue for more context, since there isn't much else to say on this page, but I don't feel strongly either way about that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang, now I see it's not even a middleware but rather a event subscriber 👀 I'll go with your summary

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the Symfony PR, I think the design changed somewhere along the way. In any event, current text LGTM.

@malarzm malarzm merged commit df06065 into doctrine:master Jun 4, 2020
@malarzm malarzm deleted the docs-messenger branch June 4, 2020 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
4.2 (unsupported)
Development

Successfully merging this pull request may close these issues.

Add documentation for messenger integration
2 participants