What's going on, in and out


Laravel 10 is Released – Find Out What’s New!

Laravel, the open-source PHP framework, has been developed and maintained by Taylor Otwell. The Laravel PHP framework follows semantic versioning. So, the framework makes new major release and updates annually. Taylor Otwell released two new framework versions, Laravel 10 and Laravel 10.1, on February 13, 2023, and February 22, 2023. While Laravel 10 has several new and exciting features for the popular framework, version 10.1 has a few fixes requested by the developer’s team.

If you already have an existing website based on Laravel, it’s time to update your website to the latest version. This article informs you about the new features available with the latest Laravel version and why you need to upgrade your website. 

What to Expect with Laravel 10?

The new version of the PHP framework, Laravel 10, offers massive changes. These modifications are focused on enhancing the security and performance of the Laravel PHP framework. Earlier, the PHP framework was releasing upgrades semiannually. However, after Laravel 9, the official Laravel team switched to releasing one major update annually. 

Here’s a look at the release dates of the earlier versions –

Laravel Version Release Date Probable Bug Fixes Date Probable Security  Fixes Date
Laravel 9 8 – February – 2022 August 2023 February 2024
Laravel 10 13 – February – 2023 August 2024 February 2025
Laravel 10.1 22 – February – 2023 August 2024 February 2025
Laravel 11 6 – February – 2024 (expected) August 2025 (expected) February 2026 (expected)

New Features Available with the Laravel 10 & 10.1 Version 

Goodbye PHP 8.0 Support 

The Laravel 10 & 10.1 versions have ended their support for PHP 8.0 and earlier programming language versions. So, websites need to upgrade their PHP version initially before upgrading to Laravel 10. Additionally, the support for Predis v1 has also been stopped. Thus, websites also must be on the Predis v2 to upgrade to Laravel 10. Post thorough testing of the existing websites and apps, any business can begin with the upgrade.

Availability of the Laravel Pennant for Feature Flags

Laravel 10 comes with a lightweight, robust library called Laravel Pennant. It is useful in managing flags and simplifies the process of A/B testing. The library hosts multiple attractive features to help businesses drive traffic and user engagement on their existing websites. Any business enterprise can track and manage several activities via Laravel Pennant – 

  • Rolling out fresh features into websites and apps in an incremental manner
  • Stop and start existing features with zero code modifications
  • Compatible with the trunk-based development strategy
  • Find out the availability and whether any concerned element is active or inactive
  • The overall impact of the shift in colors over the existing website or web app

‘Profile’ for Optimizing Slow Tests

The new version of the Laravel framework comes with the popular feature, ‘- – profile’. Using this option, the Laravel support team can quickly identify tests that are slow and need optimization. It enhances the speed of debugging the concerned website or app.

Experience Native Type Declarations

The latest Laravel version follows native-type declarations in the app skeleton code. So, the code created by the developers returns types and type hints. Additionally, it will also provide method arguments, userland types, etc., to the PHP developers. The result is type clarity and auto-complete features.

Artisan Command Becomes Interactive

The command line interface tool called Artisan Console is more interactive. The developer can pass the name once they have developed the model. 

php artisan make : model

The new Artisan Console will not display errors. Instead, ask for the model’s name. Developers can also create a factory, migration, and more.

Invokable Validation Rules

The new Laravel framework has invoked validation rules by default. Earlier, Laravel programmers were required to integrate the ‘—invokable’ flag after the Artisan command to make functions invokable. However, with default-involved validation, this necessity has been eliminated extensively for existing and new Laravel projects.

Simpler Process Handling

Laravel 10 is integrated with the Symfony Process component. Laravel programmers can now run external processes in the Laravel application with less effort. It also easily addresses standard use cases for a smooth and error-free development experience.

Eliminated Multiple Deprecations From Laravel 9

Various features marked as deprecations in the Laravel 9 version have been eliminated with Laravel v10, so when upgrading to the new version, a dedicated Laravel developer needs to recode for these features marked deprecated. 

Various Deprecated Methods:

  • MaintenanceModeException class
  • Route::home method
  • getBaseQuery method
  • MocksApplicationServices trait
  • Mail::failures method in the mail fake
  • assertTimesSent() method
  • Support for Predis 1 and doctrine/dbal 2
  • Advised using $casts in place of the deprecated $dates 

Wrapping Up

You need not upgrade to the latest laravel version immediately. However, sooner or later, it’s best to upgrade to Laravel 10 as it has led to significant improvements in terms of web security. Moreover, the ease of A/B testing capabilities with the new version will help businesses experiment with the outlook and features of the website.

At Laravel Wizard, we ensure necessary web optimization and code modification for a seamless upgrade. Our Laravel support team takes several backups and plans the entire upgrade process. This way, we ensure minimum downtime and high website performance for the Laravel projects.

Share this blog