問題描述
我將我的項(xiàng)目從辦公桌移到另一個(gè)辦公桌.
當(dāng)我運(yùn)行 php artisan
時(shí)它不起作用.
I moved my project from desk to another.
When I run php artisan
it does not work.
我嘗試運(yùn)行 composer update
,但它返回錯(cuò)誤
I tried to run composer update
, but it returns the error
腳本@php artisan package:discover 處理返回的自動(dòng)加載轉(zhuǎn)儲(chǔ)后事件,錯(cuò)誤代碼為 255
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
推薦答案
這是我從 laravel 6.x - 7.x 升級(jí)后解決這個(gè)問題的方法:
This is how I solved this after an upgrade from laravel version 6.x - 7.x:
在AppExceptionsHandler
中改變了
//Use Exception;
Use Throwable;
然后接受 Throwable
而不是 Exceptions
的實(shí)例的方法如下:
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);
在 configsession.php
中:
//'secure' => env('SESSION_SECURE_COOKIE', false),
'secure' => env('SESSION_SECURE_COOKIE', null),
然后運(yùn)行composer update
這篇關(guān)于腳本@php artisan package:discover 處理返回錯(cuò)誤代碼 255 的 post-autoload-dump 事件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!