
PHP is far from dead: The latest and greatest version of Laravel has been released.
Just a few days ago, Laravel officially released its new version of Laravel 10 to the public. This new version of the quintessential PHP Framework comes loaded with important changes and new features, which shows us that PHP may not be dead, but perhaps more alive than ever. Let's take a look.
Some of the major new features in Laravel 10 include the minimum requirement of PHP 8.1, support for PHP 8.2, Laravel Starter Kit upgrades, Predis version upgrades, native type declarations, and more. We are just going to mention some of the main points to take into account if you plan to try this new version, but you can always check out the official Laravel release notes to learn more about these changes.
-
Minimum Required PHP Version is 8.1: One of the major changes in Laravel 10 is that it requires PHP 8.1 or later, making it one of the few PHP frameworks that requires the latest version of PHP. This update means that Laravel can take advantage of the new features and performance improvements in PHP 8.1, such as read-only properties, array_is_list, and much more.
-
Support for PHP 8.2: PHP 8.2 was released just two months before the release of Laravel 10. However, developers can use PHP 8.2 with Laravel 10 and the entire Laravel ecosystem without doing anything extra, including Forge, Vapor, and Envoyer.
In addition to PHP upgrades, Laravel 10 comes with an updated authentication scaffold that simplifies the process of setting up authentication for web applications. The new scaffold includes better default styles and enhanced error handling.
Laravel 10 also comes with upgraded Laravel Starter Kits, including Laravel Breeze and Laravel Jetstream, which are now compatible with Inertia.js 1. Jetstream has also added complete dark mode support, making it easier for developers to work in low-light environments.
Other notable updates in Laravel 10 include a switch from Predis 1 to Predis 2 for Redis clients, improved native type declarations, and better support for Postgres and CockroachDB databases. On top of that, Laravel 10 now includes native type declarations, which allows developers to specify the types of function arguments and return values directly in the function signature. This can help to improve code quality and reduce the likelihood of bugs and errors.
As you can see, Laravel 10 includes several exciting new features that will make web development easier and faster for developers. With native type declarations, container-aware exception handling, and improved handling of route parameters, developers can build more robust and secure web applications with less code. Additionally, the support for PHP 8.2 and the upgrade of Laravel Breeze and Jetstream make it easier to set up new Laravel projects. These updates and new features demonstrate the Laravel community's commitment to making Laravel the best web development framework available.