新版本的 Handler.php 现在是在哪个目录下呢?
https://github.com/walkor/webman/blob/8e93d319ffe4cfb41bc916d3ac8f8c124f2ca802/config/exception.php#L16
在新版本中,这部分需要调整,以便于适配。这里的调整有比较好的建议吗?
https://github.com/mouyong/php-support/blob/master/README.md?plain=1#L26
新版的目录找到了,在 webman-framework 的目录下:https://github.com/walkor/webman-framework/blob/master/src/support/exception/Handler.php
通过 composer.json 配置了 psr-4 加载规范:https://github.com/walkor/webman-framework/blob/master/composer.json#L37-L42
Hello, I am having the same problem, my Handler.php in "support\exception" is not being called
我是自己继承了webman的 ExceptionHandler 不使用vender 下面的
namespace App\handler; use Webman\Exception\ExceptionHandler; class Handler extends ExceptionHandler{ public function report(Throwable $exception) { parent::report($exception); }
public function render(Request $request, Throwable $exception): Response
{
.....
return json();
}
}