How to upgrade to Laravel 9 ๐Ÿš€

Emmanuel Paul Mnzava.
3 min readFeb 16, 2022

Hello everyone ๐Ÿ‘‹,

Today I will be going through how to upgrade your laravel application to version 9,

Laravel 9 was released on the 8th of February 2022 it includes many new features but one that stands out is the fact that the latest release only goes with the minimum version of PHP 8.0 ๐Ÿคฏ ! .

Yes, this certainly means if your laravel application is in Laravel 8 or older version you might need to upgrade your PHP version before upgrading the application.

I had written an article a while back explaining how to upgrade your laravel application to the latest version if you have not read it click on this link to have a look.

The following are major updates in L9

1. Minimum PHP version of 8.0. requirement

2.Shift from swift mailer to symfony mailer

3. Upgrade of file system to file system 3.x

4. Improved Eloquent Accessors / Mutators

5. Enum Eloquent Attribute Casting

6. Implicit Route Bindings With Enums

7. Forced Scoping Of Route Bindings.

8. Controller Route Groups. ๐Ÿ‘Œ

9. Laravel Scout Database Engine

10. Rendering Inline Blade Templates. ๐Ÿ‘

11. Slot Name Shortcut

12. Checked / Selected Blade Directives ๐Ÿ‘

13.Bootstrap 5 Pagination Views ( Paginator::useBootstrapFive(); )

14. Improved Validation Of Nested Array Data

15. Laravel Breeze API & Next.js.

16. Improved Ignition Exception Page

17. Improved route: list CLI Output.

18. Test Coverage Using Artisan test Command

19. Soketi Echo Server

20. New Helpers.

Above are some of the major updates that are in L9, I won't go over them in this article but I will select some of them and create articles explaining what the exact update is and how it works so stay tuned.

So how do I upgrade my laravel application?

First, let's go over our composer.json file and look for laravel/framework and nunomaduro/collision you can look at mine below

Change `laravel/framework package from ^8.12 to ^9.0

Change nunomaduro/collision from ^5.0 to ^6.1

change facade/ignition to โ€œspatie/laravel-ignitionโ€: โ€œยน.0โ€

Then run

composer update

After you have finished running the composer update go to the following page and read about some high-impact changes that you need to make https://laravel.com/docs/9.x/upgrade depending on which version you upgrading there will be a few differences in the skeleton framework that you need to make.

Notice this guide is to help you quickly update your application there may be a few files that need to be updated that have not been listed on this guide please donโ€™t forget to read the upgrade documentation that is available on the official laravel website.

Before you goโ€ฆ I would like to introduce to you storewid.com, an eCommerce platform that can help you build, manage and grow your online store with ease.
Visit storewid.com and try it out for free.

Thanks for reading the article! If you enjoyed it, please donโ€™t forget to show your appreciation by clicking ๐Ÿ‘ below!

Any questions or comments hit me up on

Mail: epmnzava@gmail.com

Twitter: https://twitter.com/epmnzava

Github: https://bit.ly/3L4IXaC

LinkedIn: https://bit.ly/3w5Oklq

--

--

Emmanuel Paul Mnzava.
Emmanuel Paul Mnzava.

Written by Emmanuel Paul Mnzava.

Software Engineer and techprenuer with passion of helping entreprenuers and small businesses using Technology.

No responses yet