Update cookies preferences

What’s new in the Laravel 10 upgrade

Our review of 10 notable changes that developers should look out for in the Laravel 10 upgrade

Laravel is one of the most popular PHP frameworks. It provides a base to quickly start a project and is used by many developers that are just starting their journey, as well as very experienced devs.

Last year with the release of Laravel 9, they changed the schedule of their releases from two a year to one a year. This year marks the release of Laravel 10. 

Here are some notable changes we have seen in this upgrade:

Guest Middleware

The deprecation of the unauthenticated middleware and introduction of the guest middleware makes it easier for developers to manage user authentication, and authorisation in their application. The guest middleware provides more clarity on the intended behaviour for unauthenticated users.

Laravel Pennant

This is a new first-party package witch allows you to easily define features and wasily determine if user has access to this feature.

For more about Laravel Pennant check Pennant Documentation.

Help with testing

The new assertSessionHasInput method in testing allows developers to easily check for the presence of specific form inputs in a response, providing more clarity and accuracy in tests.

The new withoutMiddleware method in testing API endpoints allows developers to test their API routes more easily, without the interference of middleware.

The Artisan test command has received a new --profile option that allows you to easily identify the slowest tests in your application.

Easier deployment

The inclusion of environment variables in the config:cache command by default makes it easier for developers to deploy their application, as all configuration is included in the cached file.

Horizon and Telescope

Popular tools used for Laravel powered Redis queues and checking the requests coming to your application has gotten a fresh design.

Better error messages

Improved error messages for type hints in controller methods make it easier for developers to identify and resolve type-related issues in their code.

Process Layer

New Laravel comes with an abstract layer for starting and interacting with external processes.

With Laravel's Process layer, you can easily execute system commands from your Laravel application. This is useful when you need to perform system-level tasks like creating a new user, installing a package, or managing files.

You can use Laravel's Process layer to start, stop, and monitor external services like a web server, a database server, or a message queue. This can help you automate the deployment and management of your application.

Overall, Laravel's Process layer provides a flexible and powerful way to interact with external processes from within your Laravel application. It can help you automate tasks, improve performance, and streamline your development workflow.

Better support for MongoDB

Enhanced support for MongoDB, including improved model serialisation and query builder functionality, making it easier for developers to work with MongoDB in their Laravel application.

New error logger

The new log method in the Illuminate\Support\Debug\Dumper class in Laravel 10 improves error handling and debugging, providing developers with more information and insights into issues that may occur in their application.

PHP Version changes, bug and security final fix dates

Laravel 10 is dropping PHP 8.0 and now the min PHP version is PHP 8.1. This means if you want to upgrade your app you will have to make sure it uses the up to date PHP (8.1 or 8.2 at the time of writing this article). 

The Bug Fixes for the Laravel 10 release is up until August 6th 2024, and the Security Fixes for the Laravel 10 release is up until February 4th 2025.

Laravel 9 to Laravel 10 upgrade

Upgrading your Laravel 9 application to Laravel 10 is a crucial step to ensure that your website or application remains secure and up-to-date with the latest features and technologies. 

Our professional and experienced team of developers can help you to make the transition seamless and hassle-free. By using our service, you can rest assured that your website will not only be upgraded to the latest version of Laravel but also optimised for performance, security, and functionality. 

With our fast and reliable support, you can focus on growing your business while we take care of the technical details. Upgrade your Laravel 9 application today and unlock the full potential of the framework with the help of our expert team, we also have experience in developing Laravel apps.

Upgrade to Laravel 10 now!

Otherwise follow our how to upgrade to Laravel 10 yourself!

If you'd like support on your Laravel upgrade


Sebastian

Sebastian Tracz

Senior Magento Developer

Sebastian is a Senior Magento Developer who has worked on eCommerce projects since 2019 and has been with Develo since 2021. Seb’s favourite aspect of web development is impacting clients’ businesses through meticulous detail in development. His favourite aspects of Magento are its flexibility for client growth and its supportive community. His best achievement from his time at Develo so far is writing a top-performing Laravel blog. Outside of work, he is a rockstar in several bands..

Develo is a leading Magento agency and eCommerce web development company based in Birmingham, in the UK, serving clients globally since 2010. We provide our Learn articles to share knowledge of magento web development, web app development and more to the wider web developer community. To extend your team with our white label web developers, collaborate or consult with us on your project contact us here.


...
Sebastian

share:

Ready to start your next project?

See how we can help you accelerate your business