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.
The following are major updates in L9
- Minimum PHP version of 8.0. requirement
- Shift from swift mailer to symfony mailer
- Upgrade of the file system to file system 3. x
- Improved Eloquent Accessors / Mutators
- Enum Eloquent Attribute Casting
- Implicit Route Bindings With Enums
- Forced Scoping Of Route Bindings.
- Controller Route Groups. 👌
- Laravel Scout Database Engine
- Rendering Inline Blade Templates. 👍
- Slot Name Shortcut
- Checked / Selected Blade Directives 👏
- Bootstrap 5 Pagination Views ( Paginator::useBootstrapFive(); )
- Improved Validation Of Nested Array Data
- Laravel Breeze API & Next.js.
- Improved Ignition Exception Page
- Improved route: list CLI Output.
- Test Coverage Using Artisan test Command
- Socket Echo Server
- 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?
I'll be upgrading my own application to version 9 from version 8 hence this article will be a good explainer so just follow along,
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
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 do not forget to read the upgrade documentation that is available on the official laravel website.
Before you go… Thanks for reading the article!
Any questions or comments hit me up on
Mail: epmnzava@gmail.com
Twitter:
Github: