Laravel v10.30.0 Released
Laravel v10.30.0 was just released. Let's take a look at the new interface that has been added.
The ShouldDispatchAfterCommit interface
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.
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>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.
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>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.