This article brings you the latest news about Laravel10, which mainly introduces what new features the upcoming Laravel10 may have. Friends who are interested should take a look at it. I hope it will be helpful to everyone.
Laravel v10 is the next major version of Laravel, scheduled to be released on February 7, 2023. This article will outline all the new features and changes we know about.
I hope you'll review this post over the next few weeks as we continue to review what's being added to Laravel 10 and update this post ahead of the February release.
Before Laravel 9, major framework versions were released twice a year or roughly every six months. Starting with Laravel 9, the core team has developed an annual plan to release Laravel 9 in February 2022 (instead of the original plan of September 2021):
Laravel uses many excellent community drivers Extension packages to implement framework features, such as Symfony's 9 components. Symfony 6.0 was released in November. Therefore, we have chosen to postpone the release of Laravel 9.0 to 2022
Due to the delayed release, we can upgrade Symfony-based components to Symfony 6.0 without having to wait until September 2022 to perform the upgrade. On the other hand, this better prepares us for subsequent annual releases, since our releases always happen two months after Symfony releases.
The annual major version release schedule of this plan is as follows:
Laravel 9 will continue to resolve bugs until August 8, 2023, and will be #February 6, 2024 Security issues will be resolved before
Laravel 10 will continue to resolve bugs by August 6, 2024, and will be released by February 4, 2025 Solve security issues before
Laravel framework will no longer be compatible with PHP in Laravel 10 <=v8.0
Version. The minimum required version will be PHP ^8.1
. See Comparison between master and 9.x, we can look forward to 8.1 features being used in the framework, such as read-only attributes.
In Laravel 10, framework-generated struct code will have built-in type declarations. This means that any class created by the user through the framework will have type hints and return types. Our article discusses these considerations, and we think you'll enjoy adding types to your new projects.
[Related recommended learning: laravel video tutorial]
The type addition method can use the latest PHP type reminder feature in the Laravel project without breaking it at the framework level. Backward compatibility.
In Laravel 10, Executable validation rules Now the default. When you create a new rule via artisan, you can expect the following:
# 在 Laravel 9 创建一个实现了 Illuminate\Contracts\Validation\Rule 接口的 # 规则类 artisan make:rule Uppercase # 在 Laravel 9 创建一个标注为 可执行和隐式调用的规则 artisan make:rule Uppercase --invokable artisan make:rule Uppercase --invokable --implicit # 在 Laravel 10 默认创建的规则类即可执行 artisan make:rule Uppercase # 在 Laravel 10 中的隐式调用规则 artisan make:rule Uppercase --implicit
Some features in Lavavel 9 are marked as Deprecated method that will be removed in Laravel 10. We hope to publish upgrade guidance to provide an overview of all deprecated methods, assess the potential impact, and determine how to update recently released versions.
Here are some compatible features that were deprecated between the Laravel framework master branch and the 9.x branch, listed according to time:
Delete various deprecationsPull Request #41136
Delete deprecated date attributesPull Request #42587
DeletehandleDeprecation
MethodPull Request #42590
DeleteassertTimesSent
MethodPull Request #42592
Delete $defaultName## of
ScheduleListCommand # Property
419471eDelete deprecated
Route::home Method
Pull Request #42614Delete deprecated
dispatchNow
Pull Request #42591
Official Release Page to find visible updated information.
Original address:laravel-news.com/laravel-10 Translated on January 3, 2023
The above is the detailed content of Laravel 10 is coming, let's take a sneak peek!. For more information, please follow other related articles on the PHP Chinese website!