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 to upgrade to the latest Laravel release.

Check the Laravel 9 Upgrade Guide in a new post.

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 release

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.

Update check tool

Want to check if you can upgrade your Laravel project? Copy your composer.json and paste it into the "Can I upgrade Laravel yet?" tool made by LaravelShift.

Steps to update Laravel 7 to 8

  1. ensure current application version is 7.x
  2. ensure your environment supports PHP 7.3; this is the minimum supported version
  3. on local environment
  4. in the CI/CD pipeline
  5. on the production environment
  6. ensure all external packages are compatible with Laravel 8 (you can use the composer.json checker from Laravel Shift)
  7. update dependencies (automated using Laravel Shift)
  8. update the Laravel dependencies (it's done for you)
  9. update external dependencies in composer.json that are not done by Laravel Shift
  10. update dependencies (manually)
  11. update the Laravel dependencies in composer.json
  12. update external dependencies in composer.json
  13. run the project tests and fix all broken features/tests
  14. 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.

Robin Dirksen
Robin Dirksen

Follow me on Twitter, there I post web-related content, tips/tricks, and other interesting things.

On my blog, you can find articles that I've found useful or wanted to share with anyone else.

If you want to know more about this article or just want to talk to me, don't hesitate to reach out.

Legal