Shift with red gradient lettering

Upgrade Laravel 4.2 to Laravel 5.0

The Laravel 5.0 Shift automates the upgrade from Laravel 4.2 to Laravel 5.0. Using the Laravel 5.0 Shift to automatically upgrade your Laravel application has an estimated time savings of over 6 hours.

Laravel 5.0 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.0 Shift


  • A Laravel application running Laravel 4.x.

Core Upgrades

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

  • Migrating all your app files to their new Laravel 5.0 locations (e.g. app/controllers to app/Http/Controllers, app/views to resources/views, etc).
  • Replacing core Filters with Middleware.
  • Upgrading your User model with the new user authentication in Laravel 5.0.
  • Changing Blade templates to use the new {!! !!} directives to avoid improper escaping with the differences in Laravel 5.
  • Upgrading various object references for Laravel 5, e.g. SoftDeletingTrait to SoftDeletes.
  • Adding the Form & HTML Facades from the Laravel Collective as they were removed in Laravel 5.
  • Updating composer.json for Laravel 5.

Additional Upgrades

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

  • Changing Model class inheritance from Eloquent to Model.
  • Applying your code style.
  • Namespacing your existing App classes.
  • Migrating any lowercase folder to its Titlecase equivalent to match the PSR-4 namespacing in Laravel 5.

Manual Upgrades

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

  • Environment Configuration changed in Laravel 5.0. Since these files are often excluded from version control, Shift can not automatically upgrade your environment configuration from Laravel 4.2.
  • Filters were replaced by Middleware in Laravel 5.0. While core filters were upgraded, any custom filters will need to be manually converted to middleware.
  • The Pagination methods and the Eloquent remember method changed in Laravel 5.0. Given the dynamic nature of PHP and the various ways to use these methods, Shift can not reliably update these method calls automatically.

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.