Today, In this post we wanted to outline changes and features that you can expect with the Lavarel 10 update. Laravel v10 is the next major version of Laravel, after Laravel v9 and Laravel v8, planned for release in February 2023.
Before Laravel 9, major framework versions were released twice a year or roughly every six months. Starting with Laravel 9, the core team went to an annual schedule, shipping Laravel 9 in February 2022 (instead of the originally planned September 2021).
This schedule going forward is one major release annually:
Laravel 9: February 8th, 2022
Laravel 10: February 2023
Laravel 11: February 2024
Laravel 9 will continue to get bug fixes until August 8th, 2023, and security fixes until February 6th, 2024. You can expect Laravel 10 bug fixes until August 6th, 2024, and security fixes until February 4th, 2025.
The laravel process layer service, like the HTTP facade, makes working with APIs a cinch. The process service will make working with, Testing, and running a CLI process a dream to work with. You can check the following example from
use Illuminate\Support\Facades\Process;
$result = Process::run('ls -la');
$result->successful();
$result->failed();
$result->exitCode();
$result->output();
$result->errorOutput();
$result->throw();
$result->throwIf(condition);
Which includes the features such as:
fake()
Laravel framework will drop support for PHP <=v8.0
in Laravel 10. The minimum required version is PHP ^8.1
.
Laravel 10 will use native PHP type declarations across any generated code that can exist in userland:
Types are being added in a way that brings the latest PHP type-hinting features to Laravel projects without breaking backward compatibility at the framework level:
Starting in laravel 10,
When you create a new validation rule via artisan, this is what you can expect:
# Laravel 9 creates a rule class that implements the
# Illuminate\Contracts\Validation\Rule interface
artisan make:rule Uppercase
# Laravel 9 flag to create an invokable and implicit rule
artisan make:rule Uppercase --invokable
artisan make:rule Uppercase --invokable --implicit
# Laravel 10 creates an invokable rule by default
artisan make:rule Uppercase
# Laravel 10 implicit rule
artisan make:rule Uppercase --implicit
A new feature coming to Laravel 10 is a --profile
option that will make it easy for you to find any slow tests in your application.
Here are some deprecations found in the
handleDeprecation
methodassertTimesSent
methodScheduleListCommand's
$defaultName
propertyRoute::home
methoddispatchNow
functionality.If you want to start testing Laravel 10 now, you can install it in a fresh project by using the --dev
flag:
laravel new <your-project-name> --dev
We will be updating this post as those get announced.
Thank You! Cheers...
Happy Coding!
Originally published here.