Upgrade Laravel to 8.x

In this section, here I’ll discuss how to upgrade Laravel7.x to new Laravel8.x.

PHP version:

For upgrading to laravel8.x you must have PHP version 7.3.0 (Must needed 7.3 or higher php version).

Upgrade Dependencies

For upgrading your project open file composer.json and edit/update the following dependencies version:

guzzlehttp/guzzle to ^7.0.1
facade/ignition to ^2.3.6
laravel/framework to ^8.0
laravel/ui to ^3.0
nunomaduro/collision to ^5.0
phpunit/phpunit to ^9.0
Note: This is important, If you’re using any packages in your laravel project so go to the GitHub or their website and check their upgrade guide or latest version supported to Laravel8.x or not. If package supported the latest laravel version then update the dependencies like above one.

For example,
In my project I’ve used the laravel telescope with version 3.2 => “laravel/telescope”: “^3.2”,
So, upgrade to this into new one check the latest version of this package and update this, “laravel/telescope”: “^4.1.0”,

After setup all of these dependencies, run these commands:

  • Open your terminal and run the composer update command for upgrade the project into new one.
  • After completing the composer update command run this command next:
    composer require laravel/legacy-factories

Leave a Comment

© 2023 aynsoft.com - Website Development, Software Development Company India