This week the Laravel 10 Release framework was released with minimal PHP 8.1 requirements and revised major release schedule. As from Laravel 9, the core Laravel team switched to an annual release schedule. This started back in 2021 when the release was shifted to accommodate the release of Symfony 6.0 back in November 2021. Going forward these two released with be aligned. In a nutshell instead of two major releases a year, there will just be one major release in February. That will see the release of Laravel 11 in February 2024.
For the active releases of Laravel, the following are the expected bug fixes and security updates schedule:
- Laravel 9 will continue to get bug fixes until August 8, 2023 and security fixes until February 6, 2024.
- Laravel 10 will get bug fixes until August 6, 2024 and security fixes until February 4, 2025.
- Laravel 11 is expected to get bug fixes until August 5, 2025 and security fixes until February 3, 2026.
Highlights of Laravel 10 Release
PHP 8.1 is the minimum required PHP version in Laravel 10 with the introduction of
readonly properties and
array_is_list among others which are features of PHP 8.1. Laravel 10 Release and Laravel 9 too, also comes with support for PHP 8.2 which was released on December 8, 2022.
Predis, the robust Redis client for PHP for caching has gotten an update in this new versions. Laravel formerly supported both Predis 1 and 2, but starting with Laravel 10, the framework no longer supports Predis 1.
Other official Laravel packages that have been updated to support Laravel 10 include:
- Cashier Stripe
- Pennant (new package)
As mentioned above, Laravel Pennant is a new package that provides Feature Flags for your applications. Feature flags enable you to incrementally roll out new application features with confidence, A/B test new interface designs, compliment a trunk-based development strategy, and much more.
Next we have the Process layer for Laravel. This is a Laravel Process service that makes testing and running CLI processes easy to work with. Out of the box, this process layer includes the following rich features:
- Fluent process methods to build a process instance before running it
- Process output handling as it is received
- Asynchronous processes
- Process Pools
- Rich testing features via
- Preventing stray processes during tests
Native type declarations in the application skeleton code has now got native type ceclarations. This means that any code in userland generated by the framework will have type-hints and return types. With this feature, 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, invokable validation rules are now the default. If you were to make an invokable validation rule in Laravel 9, you would need to add an
--invokable flag after the Artisan command. This is no longer necessary because all Laravel 10 rules are invokable by default.
With the new String Password helper, the
Str::password method can generate a secure, random password of a given length. The password will consist of a combination of letters, numbers, symbols, and spaces. By default, passwords are 32 characters long.
For these and more details with practical examples highlighting the Laravel 10 release features please visit the official release notes and the announce page as listed below.
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.