The Laravel team has released version 10.9 with several new features and enhancements. Among the changes are named static methods for middleware, new HTTP status assertions for feature testing, and the ability to prune all canceled and unfinished queue batches.
Additionally, Ignition IDE links with work with the
artisan serve command, which allows them to open files in their IDE by clicking on the filename displayed on an Ignition error page.
Let's look at the features and changes introduced in Laravel 10.9:
Named Static Methods for Middleware
Route::get('users', UserController::class)->middleware([Authenticate::class, // default.Authenticate::using('web'), // specify a guard.Authenticate::using('web', 'another'), // specify multiple guards.Authorize::using('store', Post::class),EnsureEmailIsVerified::class, // default.EnsureEmailIsVerified::redirectTo('route.name'),]);
New HTTP Status Assertions
Miran AL Mehrab contributed three new HTTP status assertions for writing feature tests in Laravel:
$response->assertGone(); // 410$response->assertInternalServerError(); // 500$response->assertServiceUnavailable(); // 503
Allow Pruning All Cancelled and Unfinished Queue Batches
James Hulse contributed an update to
queue:prune-batches that allows you to prune unfinished and canceled batches with the
--cancelled=0 flags. Now, the code will check for non-null values. See Pull Request #46833 for more details.
Configure Ignition IDE Links With
Niclas contributed the ability to pass-through
IGNITION_LOCAL_SITES_PATH to the
artisan serve command, which enables you to open files in your IDE by clicking on the filename displayed on an Ignition error page.
See Pull Request #46857 for further details.
- Add new HTTP status assertions (#46841)
- Allow pruning all cancelled and unfinished queue batches (#46833)
- Added named static methods for middleware (#46362)
- Fix date_format rule throw ValueError (#46824)
- Allow separate directory for locks on filestore (#46811)
- Allow to whereMorphedTo work with null model (#46821)
- Use pivot model fromDateTime instead of assuming Carbon in
- Make rules method in FormRequest optional (#46846)
- Throw LogicException when calling FileFactory@image() if mimetype is not supported (#46859)
- Improve job release method to accept date instance (#46854)
- Use foreignUlid if model uses HasUlids trait when call foreignIdFor (#46876)