donpuerto's avatar

How to upgrade your laravel application?

I was thinking on how to upgrade my laravel apps into current version. For example, I installed laravel apps 5.0, then theres in coming 5.1 or 5.2? how to upgrade my current verion to the latest one? as you know to creating our own boilerplate it will take a week as a rook but i dont want to stay behind with these new updates...

Thanks..

0 likes
6 replies
michaeldyrynda's avatar

It's (mostly) a case of updating your composer.json and running composer update but, always make sure you read the release notes and upgrade guide before performing the upgrades, taking note of any special requirements or breaking changes.

Generally speaking, there's not much to do - particularly with dot-releases - but from time to time, you might need to make code changes.

Always make sure you're doing this in dev/staging and testing before you push the upgraded code out to production.

2 likes
donpuerto's avatar

@CImrie yeah its nice to have step by step procedure but its nicer to have let say php artisan update to 5.1.11, one line of code then it updates everything..

@deringer I think it is a general practice now a days to update your code when there is new version coming.

michaeldyrynda's avatar

@donpuerto not necessarily. Those on 5.1.x may not update at all until the next LTS release comes out, except for critical security issues.

A one line update isn't trivial, either, particularly if underlying code structure changes or methods are removed.

End of the day, you need to check release notes and run tests to make sure everything works as expected.

jason-mccreary's avatar

For future readers, I created Laravel Shift to help Laravel developers upgrade their applications. It effectively automates the changes in the Laravel Upgrade Guide as well as other updates and submits a pull request with all the changes for you to review.

3 likes

Please or to participate in this conversation.