Update Laravel version 5.5 to 5.8

Recently, I got a chance to update my current Laravel project version from 5.5. to 5.8. In this post, I will let you know how I achieved it.

I decided to update them one by one and divided problem into three phases which are like:-
  • Laravel 5.5 to Laravel 5.6.
  • Laravel 5.6 to Laravel 5.7
  • Laravel 5.7 to Laravel 5.8

Laravel 5.5 to Laravel 5.6

First of all, I read update document guide of Laravel 5.6 check all changes for version 5.6. I also identify those packages which I am currently using and they need to update. After I make changes in my composer.json and these changes are following.
  • "laravel/framework": "5.6.*"
  •  "phpunit/phpunit": "^7.0",
These changes depends on packages which I are including in my application and update. All requirements for Laravel 5.6 shown in Image.
After update all changes in composer run composer update. After that i make some changes into my config folder these are following:-
  1. Remove logging information from app.php. 
  2. Copy a new logging.php file from here.
Now, My Laravel version is updated to 5.6. For more Information click here.

Laravel 5.6 to Laravel 5.7

Again, I start with Laravel 5.7 update Guide and found those packages which are updated in laravel 5.7. So, The only package i needs to update for laravel 5.7 is "laravel/framework": "5.7.*". Laravel 5.6 is not supporting php artisan optimize (check here) that's why i removed it from composer.json. 
After these all composer changes I run composer update. Now, My Laravel version is updated to 5.7.

Laravel 5.7 to Laravel 5.8

The package changes i found from Laravel 5.8 update guide is "laravel/framework": "5.8.*" . After that run composer update and finally my project is updated to Laravel 5.8.
Only problem that i faced is it don't support getenv() for resolving this i replace it by env() in whole project (check here). But this issue is resolved in Laravel 5.8.5+.  

Check More

Comments

  1. Thank you very much! Your solution saved me money for hiring some external upgrade services

    Have a great day!

    ReplyDelete

Post a Comment

Popular posts from this blog

Best practices to handle the Laravel request validation.

Write SQL queries in Laravel migration.