当我使用blade的components时,偶尔会出现 No hint path defined for [__components]

已经看过论坛中相同的问题,https://www.workerman.net/q/13477
仍然没有解决
return [
// 'handler' => Raw::class
'handler' => Blade::class,
'extension' => function (Jenssegers\Blade\Blade $blade) {
$blade->component('wflow.info', \app\View\Components\wflow\Info::class);
}
];
view配置如下:

info组件代码
<?php
namespace app\View\Components\wflow;
use Closure;
use Illuminate\View\Component;
class Info extends Component
{
public string $instanceId;
public function __construct($instanceId)
{
$this->instanceId = $instanceId;
}
public function render(): Closure
{
// 如果不使用函数的方法,直接使用 return view('components/wflow/views/Info', $data)->rawBody();的话,会无法在blade.php中直接使用所有public属性
return function (array $data) {
return view('components/wflow/views/Info', $data)->rawBody();
};
}
}
blade.php前端中使用:
<x-wflow.info :instanceId="$instanceId"/>
出现问题的代码是:
vendor/illuminate/view/FileViewFinder::parseNamespaceSegments
protected function parseNamespaceSegments($name)
{
$segments = explode(static::HINT_PATH_DELIMITER, $name);
if (count($segments) !== 2) {
throw new InvalidArgumentException("View [{$name}] has an invalid name.");
}
if (! isset($this->hints[$segments[0]])) {
throw new InvalidArgumentException("No hint path defined for [{$segments[0]}].");
}
return $segments;
}
会抛出异常
throw new InvalidArgumentException("No hint path defined for [{$segments[0]}].");
根据我目前的排查,应该是因为组件render方法中使用了rawBody的问题
return view('components/wflow/views/Info', $data)->rawBody();
引发了 \Illuminate\View\Component::createBladeViewFromString 这个方法
可能是这个方法在某个环境下不会自动调用?
是不是在调试debug模式下,只执行一次??
还有一个小问题,就是,官方给的使用教程中,链接:
https://www.workerman.net/doc/webman/view.html#blade%E4%BD%BF%E7%94%A8component%E7%BB%84%E4%BB%B6
这个教程中,没有使用public公共属性,所以在render中没有使用匿名方法返回,而是直接返回的rawBody
实际测试下来,这样无法直接在模板中直接使用公共属性,希望可以一起解决
"workerman/webman-framework": "~2.1",
"webman/blade": "^1.5",
最后,希望各位大佬可以帮忙解决问题,谢谢