Skip to content

[Doctrine][Messenger] Document middleware to log when transaction has been left open #18833

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
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
6 changes: 6 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2441,6 +2441,10 @@ may want to use:
# in any handler will cause a rollback
- doctrine_transaction

# Log an error when a Doctrine transaction was opened but
# did not closed
- doctrine_open_transaction_logger

# or pass a different entity manager to any
#- doctrine_transaction: ['custom']

Expand All @@ -2462,6 +2466,7 @@ may want to use:
<framework:middleware id="doctrine_transaction"/>
<framework:middleware id="doctrine_ping_connection"/>
<framework:middleware id="doctrine_close_connection"/>
<framework:middleware id="doctrine_open_transaction_logger"/>
Comment on lines 2467 to +2469
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't found these name in codebase. I think is generated from classname but I'm not 100% sure


<!-- or pass a different entity manager to any -->
<!--
Expand All @@ -2486,6 +2491,7 @@ may want to use:
$bus->middleware()->id('doctrine_transaction');
$bus->middleware()->id('doctrine_ping_connection');
$bus->middleware()->id('doctrine_close_connection');
$bus->middleware()->id('doctrine_open_transaction_logger');
// Using another entity manager
$bus->middleware()->id('doctrine_transaction')
->arguments(['custom']);
Expand Down