Upgrading To 8.0 From 7.x
Please follow the below steps to upgrade the Laravel version in your exiting project.
-
PHP 7.3.0 Required
Likelihood Of Impact: Medium
The new minimum PHP version is now 7.3.0.
-
Updating Dependencies
The following first-party packages have new major releases to support Laravel 8. If there are any, read through their individual upgrade guides before upgrading:
Horizon v5.0 Passport v10.0 Socialite v5.0 Telescope v4.0Finally, examine any other third-party packages consumed by your application and verify you are using the proper version for Laravel 8 support.
You must have to update below mention packages in composer.json file.
"require": { "php": "^7.4.11", "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^1.0", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.0", "laravel/passport": "^10.0", "laravel/tinker": "^2.0", "spatie/laravel-permission": "^3.8", "laravel/ui": "^3.0" }, "require-dev": { "facade/ignition": "^2.3.6", "beyondcode/laravel-dump-server": "^1.0", "filp/whoops": "^2.0", "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.3.1", "nunomaduro/collision": "^5.0", "phpunit/phpunit": "^9.0" }, -
In addition, the Laravel installer has been updated to support
composer create-projectand Laravel Jetstream. Any installer older than 4.0 will cease to work after October 2020. You should upgrade your global installer to^4.0as soon as possible.Authentication
All authentication scaffolding has been moved to the
laravel/uirepository. If you are using Laravel's authentication scaffolding, you should install the^3.0release of this package and the package should be installed in all environments. If you were previously including this package in therequire-devportion of your application'scomposer.jsonfile, you should move it to therequiresection:composer require laravel/ui "^3.0" - Now run the below command to upgrade.
composer update
php artisan --version
php artisan key: generate
npm install or yarn
npm run dev or yarn dev
php artisan serve