Laravel 10 is now released! — Phpflow.com
The laravel 10 has been relased with php 8.1 minimum requirement. Laravel 10 builds on the improvements made in Laravel 9.x by adding argument and return types to all application skeleton methods and stub files used to generate classes in the framework.
Prior to the release of Laravel 9, the framework underwent major version updates twice a year or approximately every six months. However, with the release of Laravel 9, the core team adopted an annual release schedule.
The future “major” releases are primarily used for maintenance tasks, such as upgrading upstream dependencies, as seen in the release notes. The main features are Pennant package, invokable validation rules, native type declarations etc.
The Minimum PHP version Requirement
In Laravel 10, the Laravel framework will no longer provide support for PHP versions earlier than v8.0. Instead, the minimum required PHP version for Laravel 10 will be ^8.1.
bug fixing of Laravel 10
Laravel 10 bug fixes until August 6th, 2024 and security fixes until February 14th, 2025.
Deprecated Methods of Laravel 9
There following features are removed in Laravel 10.
How To Upgrade to Laravel 10
The easiest way to upgrade is to utilize Laravel Shift and it can automate always keeping your application up to date, or follow the upgrade guide.
The main features of Laravel 10
There are the following main features of Laravel 10.
The Laravel team will introduce a new package called Laravel Pennant. This package offers Feature Flags functionality for your applications.
The process service in Laravel 10 aims to streamline the process of working with, testing, and running CLI processes, making it a seamless and hassle-free experience.
Native type declarations
Laravel is incorporating the latest PHP type-hinting features in a manner that maintains backward compatibility at the framework level.
Invokable Validation rules
The invokable validation rules are now the default. When you create a new validation rule via artisan:
php artisan make:rule Uppercase --invokable
Profile option for tests
Laravel 10 will introduce a new feature, the -profile option, which simplifies the process of identifying slow tests in your application.
New String Password helper
Str::password method in Laravel, you can generate a secure and randomized password of a specific length. The password will comprise a combination of letters, numbers, symbols, and spaces. The default length of the password generated is 32 characters.
Testing Laravel 10
If you want to start testing Laravel 10 now, you can install it in a new project by using the
laravel new --dev
You can also check out the official releases page for more information.