Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

后端 未结 14 2137
孤街浪徒
孤街浪徒 2020-12-03 05:09

I moved my project from desk to another.
When I run php artisan it does not work.

I tried to run composer update, but it returns the

14条回答
  •  萌比男神i
    2020-12-03 05:53

    This is how I solved this after an upgrade from laravel version 6.x - 7.x:

    In App\Exceptions\Handler changed

    //Use Exception;
    Use Throwable;
    

    Then methods to accept instances of Throwable instead of Exceptions as follows:

    //public function report(Exception$exception);
    public function report(Throwable $exception);
    
    //public function render($request, Exception $exception);
    public function render($request, Throwable $exception);
    

    In config\session.php:

    //'secure' => env('SESSION_SECURE_COOKIE', false),
    'secure' => env('SESSION_SECURE_COOKIE', null),
    

    Then run composer update

提交回复
热议问题