06
JulLaravel is a web application framework with an expressive and concise syntax. A web framework provides a structure and origin point for creating your application, permitting you to focus on creating something extraordinary while we sweat the details.
Laravel tries to render a wondrous developer experience while providing powerful peculiarities such as thorough dependency injection, a strong database abstraction layer, queues and scheduled jobs, unit and integration testing, and more.
Now the Laravel team released 8.48 with the most required filesystem disk, the ability to prune failed queue jobs, and the most advanced changes in the 8.x branch.
Mohamed Said contributed the ability to prune stale entries from the failed jobs table:
Default 24 hours
php artisan prune:failed
Specify hours
php artisan prune:failed --hours=12
Andrew Brown contributed an on-demand filesystem disk, which permits you to configure a filesystem disk spontaneously.
// String uses the local driver
Storage::build(storage_path('logs'));
// Full control over configuration
Storage::build([
'driver' => 'local',
'root' => 'my-custom-path',
'url' => 'my-custom-url',
'visibility' => 'public',
]);
Tim Robertson comes up with the HTTP Client macroable:
Having the Request macroable will authorize the elimination of excess boilerplate code when we are faking HTTP requests with body content other than Form or JSON, XML, for example;
Here you can see the example pull request’s description:
Request::macro('xml', function () {
return CustomSuperDuperXmlParser::parse($this->body());
});
Http::fake([
'example.com/*' => function (Request $request) {
$this->assertSame($request->xml()->someProperty, 'some value')
return Http::response();
},
]);
Ryan Chandler provided the capability to customize the event.stub used in the make:event command.
If you’re curious about publishing and customizing stubs in your application, you can see Customizing Stubs in Laravel
Amir Reza Mehrbakhsh extended the support for GIF, WEBP, WBMP, and BMP when formulating test file uploads. This PR updates the code to verify the file extension and create the proper test image.
Added
Added a queue:prune-failed command (#37696, 7aca658)
Added Illuminate/Filesystem/FilesystemManager::build() (#37720, c21fc12)
Allow customising the event.stub file (#37761)
Added Illuminate/Collections/Collection::sliding() and Illuminate/Collections/LazyCollection::sliding() (#37751)
Make Illuminate\Http\Client\Request macroable (#37744)
Added GIF, WEBP, WBMP, BMP support to FileFactory::image() (#37743)
Dispatch ‘connection failed’ event in http client (#37740
Published at : 06-07-2021
I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.
Launch project