Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255(脚本 @php artisan package:discover 处理返回的 post-autoload-dump 事件,错误代码为 255)
问题描述
我将我的项目从办公桌转移到另一个.
当我运行 php artisan
它不起作用.
I moved my project from desk to another.
When I run php artisan
it does not work.
我尝试运行 composer update
,但它返回错误
I tried to run composer update
, but it returns the error
Script @php artisan package:discover 处理返回的自动加载转储后事件,错误代码为 255
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
推荐答案
这是我从 laravel 版本 6.x - 7.x 升级后解决这个问题的方法:
This is how I solved this after an upgrade from laravel version 6.x - 7.x:
在AppExceptionsHandler
中改变了
//Use Exception;
Use Throwable;
然后方法接受 Throwable
而不是 Exceptions
的实例如下:
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),
然后运行composer update
这篇关于脚本 @php artisan package:discover 处理返回的 post-autoload-dump 事件,错误代码为 255的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:脚本 @php artisan package:discover 处理返回的 post-autoload-dump 事件,错误代码为 255


基础教程推荐
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01