Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to upgrade laravel 6 to 7

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].
like image 892
Haneef Ansari Avatar asked Dec 02 '22 09:12

Haneef Ansari


2 Answers

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
like image 126
Bira Avatar answered Dec 14 '22 06:12

Bira


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

like image 27
James Christian Kaguo Avatar answered Dec 14 '22 07:12

James Christian Kaguo