How to upgrade to Laravel 8
Published 08 September 2020 08:18 (2-minute read)
Every 6 months there is an upgrade to the Laravel framework. To keep up to date with the latest version I've created a flow for our projects on how to upgrade to the latest Laravel release.
When you want to upgrade your Laravel application to Laravel 8, take a look at the current version of your application. This checklist is made for applications running on Laravel 7 and wants to upgrade to Laravel 8. Other applications need to upgrade to Laravel 7 first.
Laravel 8 is released on 8 September 2020. Some other packages, like vapor-core, Laravel Spark and Laravel Nova are already upgraded to be compatible with Laravel 8.
The estimated upgrade time is 15 minutes.
I suggest waiting a few days before upgrading your application to Laravel 8 to give external dependencies the time to upgrade/test the changes.
Want to check if you can upgrade your Laravel project? Copy your composer.json and past it into the "Can I upgrade Laravel yet?" tool made by LaravelShift.
- ensure current application version is 7.x
- ensure your environment supports PHP 7.3, this is the minimum supported version
- on local environment
- in the CI/CD pipeline
- on the production environment
- ensure all external packages are compatible with Laravel 8 (you can use the composer.json checker from Laravel Shift)
- update dependencies (automated using Laravel Shift)
- update the Laravel dependencies (it's done for you)
- update external dependencies in composer.json that are not done by Laravel Shift
- update dependencies (manually)
- update the Laravel dependencies in composer.json
- update external dependencies in composer.json
- run the project tests and fix all broken features/tests
- check other changes in the "laravel/laravel" project using the GitHub comparison tool
Note, this guide will be updated to any changes in the coming days.