how to upgrade laravel 6 to 7
Solution 1
Just follow the documentation, you must have installed php7.2.5
Update your laravel/framework dependency to ^7.0 in your composer.json file.
In addition, update your nunomaduro/collision dependency to ^4.1,
phpunit/phpunit dependency to ^8.5,
facade/ignition to> `^2.0
After that as next step.
The report and render methods of your application's App\Exceptions\Handler
class should accept instances of the Throwable interface instead of Exception instances:
use Throwable; // add this line
public function report(Throwable $exception); // replace Exception with Throwable
public function render($request, Throwable $exception); // replace Exception with Throwable
after that run
composer update
Solution 2
Update The following packages
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5",
"laravel/ui": "^2.0",
"facade/ignition": "^2.0",
"laravel/framework": "^7.0",
for More clarity go to Guide
If Handle.php file error Check out Solution
Solution 3
As per Laravel Documentation to upgrade from laravel 6
to laravel 7
Update your
laravel/framework
dependency to^7.0
in yourcomposer.json
file. In addition, update yournunomaduro/collision
dependency to^4.1
,phpunit/phpunit
dependency to^8.5
, andfacade/ignition
to `^2.0.
and then run composer update in your terminal
composer update
https://laravel.com/docs/7.x/upgrade
Solution 4
PHP 7.2.5 is required for laravel 7.0. Check the documentation
https://laravel.com/docs/7.x/upgrade
Solution 5
If you are get problems with this make sure you read ahead to this section and make the required changes. I found I HAD to make the changes in composer.json to get it to work. From the command line it just kept getting in a twist:
Authentication
Scaffolding Likelihood Of Impact: High
All authentication scaffolding has been moved to the laravel/ui repository. If you are using Laravel's authentication scaffolding, you should install the ^2.0 release of this package and the package should be installed in all environments. If you were previously including this package in the require-dev portion of your application's composer.json file, you should move it to the require section:
composer require laravel/ui "^2.0"
Haneef Ansari
Updated on June 04, 2022Comments
-
Haneef Ansari almost 2 years
i am trying to upgrade laravel 6 to 7, i got an error.
our requirements could not be resolved to an installable set of packages. Problem 1 - Conclusion: remove laravel/framework v6.0.3 - Conclusion: don't install laravel/framework v6.0.3 - laravel/ui 2.x-dev requires illuminate/console ^7.0 -> satisfiable by illuminate/console[7.x-dev, v7.0.0], laravel/framework[7.x-dev]. - laravel/ui v2.0.0 requires illuminate/console ^7.0 -> satisfiable by illuminate/console[7.x-dev, v7.0.0], laravel/framework[7.x-dev]. - Can only install one of: laravel/framework[7.x-dev, v6.0.3]. - don't install illuminate/console 7.x-dev|don't install laravel/framework v6.0.3 - don't install illuminate/console v7.0.0|don't install laravel/framework v6.0.3 - Installation request for laravel/framework (locked at v6.0.3, required as ^6.0) -> satisfiable by laravel/framework[v6.0.3]. - Installation request for laravel/ui ^2.0 -> satisfiable by laravel/ui[2.x-dev, v2.0.0].
-
saber tabatabaee yazdi almost 4 yearsi added ignition to my composer then edit handle and it worked for me thanks
-
bhattraideb over 3 yearsThis worked for me upgrading V6.20 to 7.30