Hey, Did you fixed your problem?
Here is the answer,
You should follow the bellow steps,
First you should you have laravel version ^6
then open your composer.json
// add laravel/ui under require-dev
"require-dev": {
//some other packages, Do not change them
"laravel/ui": "^2.0"
},
After that you have to follow official upgrade page instruction, Im mention them here,
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, laravel/tinker dependency to ^2.0, and facade/ignition to ^2.0.
Then run
composer update
After run composer update your packages will update, but exactly you will get error
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
Here is the way how to fix this error,
First open App / Exception / Handler.php
Now you have to change few codes there,
//Add
Use Throwable;
//change
public function report(Exception $exception)
//to
public function report(Throwable $exception)
//change
public function render($request, Exception $exception)
//to
public function render($request, Throwable $exception)
Final output Handle.php should be,
<?php
namespace App\Exceptions;
use Exception;
Use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Report or log an exception.
*
* @param \Exception $exception
* @return void
*/
//public function report(Exception $exception)
public function report(Throwable $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
//public function render($request, Exception $exception)
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
}
}
After open Config / Session.php
//change
'secure' => env('SESSION_SECURE_COOKIE', false),
//to
'secure' => env('SESSION_SECURE_COOKIE', null),
Finally clear the cache (Boostrap and seasion cache)
Now your done to go!!
Now run again
composer upate
this time you will generate auto dump without any problem
:) :)