Laravel v10.30.0 was just released. Let's take a look at the new interface that has been added.
We've seen Taylor teasing this new feature on twitter: With the help of the ShouldDispatchAfterCommit interface we tell Laravel not to dispatch a given event until after the current database transaction has committed and If no transaction in progress, event will be dispatched immediately as normal.
New "ShouldDispatchAfterCommit" interface lands tomorrow.
— Taylor Otwell 🪐 (@taylorotwell) October 30, 2023
Easily instruct Laravel not to dispatch a given event until after the current database transaction has committed.
If no transaction in progress, event will be dispatched immediately as normal. 🫡 pic.twitter.com/z20V4O1vbb
The Pull Request was originally created by Mateus Guimarães and then Taylor updated the code expanding the scope of the original PR.
Today's Laravel 10.30.0 release includes the new "ShouldDispatchAfterCommit" interface. 🔥
— Taylor Otwell 🪐 (@taylorotwell) October 31, 2023
Hope you build something amazing. 💪https://t.co/Jb9uC7EQQg pic.twitter.com/YQMh9ITbAW
For the complete list of the PR's that have been merged into this release see the release notes.
Written by
Writing and maintaining @LaravelMagazine. Host of "The Laravel Magazine Podcast". Pronouns: vi/vim.
Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.