Custom post commit event #10973
-
Hi, What's the best approach migrating from deprecated The connection will not have an event manager anymore The built-in entity manager calls Connection::commit in several places. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Create a middleware and decorate the |
Beta Was this translation helpful? Give feedback.
-
ok. i could dispatch my own framework/symfony event, and refactor the listeners instead. It's probably the better approach. |
Beta Was this translation helpful? Give feedback.
-
the current transaction level is also only available in Dbal\Connection, not Driver\Connection so all in all, wrapperClass seems the best approach to get all info and dispatch events |
Beta Was this translation helpful? Give feedback.
https://www.doctrine-project.org/projects/doctrine-dbal/en/3.7/reference/configuration.html#wrapper-class 👀