Laravel 8.19 Released
The Laravel team released 8.19 yesterday with delaying queue jobs until after a transaction, a schedule:listartisan command,job encryption and the latest changes to the 8.x branch:
Delay Queue Jobs During a DB Transaction
The ability to delay queue jobs until after all database transactions are committed:
DB::transaction(function(){
$user = User::create(...);
SendWelcomeEmail::dispatch($user)->afterCommit();
});
You can also configure queue connections with the after_commit boolean to make this behavior the default. In the case of rollbacks, jobs are discarded.
Add has() method to ComponentAttributeBag
A new method to determine if a given attribute is present on a component, which returns a boolean:
@if ($attributes->has('class'))
@endif
Add schedule:list Command
Schedule:list command: to list out scheduled task details. This feature is inspired by the ThenPingMe thenpingme:schedule command.
Introducing Job Encryption
Introduction of queue job encryption, providing a UsesEncryption interface that will encrypt the command inside the payload and decrypt it when running CallQueueHandler.
Release Notes:8.19.0
Added
Delay pushing jobs to queue until database transactions are committed)
Added Illuminate\View\ComponentAttributeBag::has()
Create ScheduleListCommand
Introducing Job Encryption
Fixed
Handle Throwable exceptions on Illuminate\Redis\Limiters\ConcurrencyLimiter::block()
Fixed PDO passing in SqlServerDriver
When following redirects, terminate each test request in proper order
Performance improvement
Improve performance for Arr::flatten()
Changed
Added id to ModelNotFoundException exception in ImplicitRouteBinding