Shift with red gradient lettering

Upgrade Laravel 8.x to Laravel 9.x

The Laravel 9.x Shift automates the upgrade of your Laravel application from Laravel 8.x to Laravel 9.x. Using the Laravel 9.x Shift to automatically upgrade your Laravel application has an estimated time savings of 2 hours.

Laravel 9.x has reached end of life. It no longer receives bug fixes or security updates. Shift strongly recommends continuing your upgrade to the latest stable release of Laravel.

Screenshot of a pull request with automated changes from the Laravel 9.x Shift

Requirements

  • A Laravel application running Laravel 8.x.
  • A server running PHP 8.0 or higher.

Core Upgrades

The Laravel 9.x Shift automates many of the upgrades listed in the Laravel Upgrade Guide, including:

  • Upgrading changes within the core Laravel project files.
  • Renaming core methods and constants.
  • Stubbing new methods for interface changes.
  • Replacing references to the deprecated SwiftMailer methods.
  • Bumping to Flysystem 3.0.
  • Migrating the resources/lang folder.
  • Adding PHP return types to core Laravel methods.
  • Converting the password validation rule.
  • Detecting backward incompatibilities within your application code.
  • Updating composer.json for Laravel 9.x and PHP 8.0.

Additional Upgrades

In addition to the Core Upgrades, the Laravel 9.x Shift performs additional upgrades beyond those listed in the Laravel Upgrade Guide, including:

  • Applying your code style.
  • Modernizing PHP syntax, such as short arrays and the null safe operator.
  • Converting to anonymous migrations.
  • Using class based and tuple-syntax routes.
  • Merging the deprecated model $dates property into $casts.
  • Converting Faker property access to method calls.
  • Upgrading to Laravel Mix 6.
  • Automating and detecting changes required for PHPUnit 9.
  • Updating core config files to their Laravel 9 versions.
  • Bumping your dependencies for popular packages.

Manual Upgrades

There are some upgrades the Laravel 9.x Shift can not perform automatically. When Shift detects these it adds a detailed comment to the Pull Request to guide any additional steps you may need to do manually.

While Shift attempts to detect and automate the updates for popular community packages, you may need to update some of your dependencies manually. Always review the changelog for your dependencies for any additional changes.

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.