Home > PHP Framework > Laravel > Laravel 10 is coming, let's take a sneak peek!

Laravel 10 is coming, let's take a sneak peek!

藏色散人
Release: 2023-01-07 19:41:18
forward
2140 people have browsed it

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 10 is coming, let's take a sneak peek!

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.

Laravel 10 Release Date

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: February 8, 2022
  • Laravel 10: February 7, 2023 Date
  • Laravel 11: February 6, 2024

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 10 will no longer be compatible with PHP 8.0

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.

Using built-in type declarations in Laravel 10 struct code

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.

  • Return type
  • Method parameters
  • Remove redundant annotations as much as possible
  • Allow users to use built-in types in closure parameters
  • Exclude typed properties

Create executable validation rules set as default

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
Copy after login

Features deprecated in Laravel 9

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

And more…

Laravel 10 is still a few months away, and more new features and announcements are coming. We will update this article as these are announced. You can also check the

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!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template