Shift with red gradient lettering

Upgrade Laravel 5.1 to Laravel 5.2

The Laravel 5.2 Shift automates the upgrade of your Laravel application from Laravel 5.1 to Laravel 5.2. Using the Laravel 5.2 Shift to automatically upgrade your Laravel application has an estimated time savings of 1 hour.

Laravel 5.2 has reached end of life. It no longer receives bug fixes or security updates. Shift strongly recommends continuing your upgrade to the latest LTS release or latest stable release of Laravel. Watch upgrading old Laravel applications for tips on running multiple Shifts effectively.

Screenshot of a pull request with automated changes from the Laravel 5.2 Shift


  • A Laravel application running Laravel 5.1.x.

Core Upgrades

The Laravel 5.2 Shift automates many of the upgrades listed in the Laravel Upgrade Guide, including:

  • Removing the SelfHandling interface from Commands and Jobs.
  • Adding new Laravel 5.2 configuration options.
  • Changing uses of Auth::extend() to Auth::provider().
  • Upgrading object references for Laravel 5.2, e.g. remove ControllerServiceProvider.
  • Updating composer.json for Laravel 5.2.

Additional Upgrades

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

  • Applying your code style.
  • Upgrading core Middleware to their Laravel 5.2 versions.
  • Changing instances of RedirectResponse to use the redirect method directly.
  • Converting the base Controller to a real class.

Manual Upgrades

There are some upgrades the Laravel 5.2 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.

  • Several of the Collection methods changed in Laravel 5.2. Given the dynamic nature of PHP and the various ways to implement these methods in Laravel, Shift can not reliably update these method calls automatically.
  • Eloquent and its integration with MySQL changed in Laravel 5.2. Since Laravel applications integrate databases differently, Shift does not currently perform these upgrades.

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.