0

我的 UAT 环境中的 NotificationService 存在一些问题,但奇怪的是,这在我的本地服务器上运行良好。

$ php7 bin/控制台缓存:清除

在 DefinitionErrorExceptionPass.php 第 54 行:

无法自动连接服务“App\Service\NotificationService”:方法“__construct()”的参数“$hub”引用接口“Symfony\Component\Mercure\HubInterface”,但不存在此类服务。您是否创建了实现此接口的类?

class NotificationService {
  public function __construct(..., HubInterface $hub, ...) {

symfony/mercure 包提供了实现该接口的 HubInterface 和 Hub 类。我刚刚在 UAT 服务器上重置了项目,这个错误一直在抛出。我的 Symfony 项目是最新的 (v5.2.11) 和 mercure & mercure 包。

你知道缺少什么吗?

4

0 回答 0