Outsource Laravel Development Partner - $2500/Month | Bacancy

Automatically upgrade your Laravel app with Shift

Published on by

Automatically upgrade your Laravel app with Shift image

Laravel Shift is a new project aimed at automatically upgrading out of date Laravel apps up to the current version. The way it works is you sign-in with either Github or BitBucket, purchase a shift (an upgrade package), and then review the pull request it automatically creates.

I had a chance to speak with Jason, the lead developer on the project and what follows is a Q&A about Shift:

Can you tell us where the idea for Laravel Shift came from?

This past fall I gave a presentation at PHP[world] titled All Aboard for Laravel 5.1. While doing research for my presentation, I was surprised at the lack of resources for upgrading Laravel. There were a few blog posts and of course, the official Laravel Upgrade Guide, but no migration tools. I’ve seen migration tools for other frameworks, so I thought, “I should build one for Laravel”. I pitched the idea to Taylor at the conference and he wasn’t aware of any tool either. So during the Hackathon Laravel Shift was born.

Is the upgrade routine completely automated?

Yes, Laravel Shift is completely automated from start to finish.

To start, you sign in with your GitHub or Bitbucket account, choose a shift, specify your repo, and place your order.

Once payment is received the Laravel Shift account is added as a collaborator to your repo and your shift is added to the job queue.

When the job is finished, a new branch containing the changes is pushed to your repo and a pull request (PR) with additional comments is opened for you to review the changes before merging.

Will it work on pretty much on any app? Or are there things to watch out for?

Laravel Shift will work on any app. However, it works best for apps that do things the “Laravel Way”. So if you’ve coded away from Laravel conventions or abuse the dynamic nature of PHP, there may be more manual work for you to do before merging.

It’s important to note this is by design. Laravel Shift is opinionated about the way it upgrades your app. This way after you merge the shift you know your app is upgraded and not in some hybrid state between the previous and the current version.

Have you had any that couldn’t be converted? What happens in that case?

Laravel Shift is currently in alpha. So I’m still shaking out the bugs. Only one I considered major. I push updates nightly and stay in contact with users during the alpha release in an effort to improve each shift.

Laravel Shift is pretty cautious. If it can’t reliably perform the upgrade automatically, it will leave a detailed comment on the PR so you can upgrade manually.

It’s also important to understand that Laravel Shift uses Git as its foundation. Everything is done on a separate branch and submitted in a PR. This way you have the chance to review and perform any additional changes before merging or close it if it didn’t meet your needs.

If there is an issue, users are encouraged to comment on the PR. This makes it easier to talk about the code since its in front of us. Twitter is also a way to check or report any issues – @laravelshift.

Before the final release, I plan to build a way to allow users to request their shift be rerun. This way there’s an immediate and automated way for you to resolve issues.

To go from Laravel 4.2 to the latest would you need to go through the process three times? 4.2 to 5.0, 5.0 to 5.1, 5.1 to 5.2, etc…

Yes, you would need to do all three shifts separately. This is by design. Even though some shifts are for minor releases, there’s still a lot being upgraded. Laravel Shift does more than what’s listed in the Laravel Upgrade Guide. Plus there’s other things to consider like package dependencies and new configuration options. So you really need to review before performing the next shift.

***

If you have a project that needs updating give Laravel Shift a try.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Mastering Laravel

Join the Mastering Laravel community to level up your skills and get trusted advice.

Visit Mastering Laravel
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Cut PHP Code Review Time & Bugs into Half with CodeRabbit logo

Cut PHP Code Review Time & Bugs into Half with CodeRabbit

CodeRabbit is an AI-powered code review tool that specializes in PHP and Laravel, running PHPStan and offering automated PR analysis, security checks, and custom review features while remaining free for open-source projects.

Cut PHP Code Review Time & Bugs into Half with CodeRabbit
Join the Mastering Laravel community logo

Join the Mastering Laravel community

Connect with experienced developers in a friendly, noise-free environment. Get insights, share ideas, and find support for your coding challenges. Join us today and elevate your Laravel skills!

Join the Mastering Laravel community
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Auto-translate Application Strings with Laratext image

Auto-translate Application Strings with Laratext

Read article
Simplify Factory Associations with Laravel's UseFactory Attribute image

Simplify Factory Associations with Laravel's UseFactory Attribute

Read article
Improved Installation and Frontend Hooks in Laravel Echo 2.1 image

Improved Installation and Frontend Hooks in Laravel Echo 2.1

Read article
Filter Model Attributes with Laravel's New except() Method image

Filter Model Attributes with Laravel's New except() Method

Read article
Arr::from() Method in Laravel 12.14 image

Arr::from() Method in Laravel 12.14

Read article
Streamline API Resources with Laravel's Fluent Methods image

Streamline API Resources with Laravel's Fluent Methods

Read article