Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

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

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 error

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

In AppExceptionsHandler 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 configsession.php:

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

Then run composer update


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...