我怎样才能从 symfony 解决这个错误?

How can I resolve this error from symfony?

我正在使用 symfony,但我一直收到此错误

传递给 Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector::__construct() 的参数 1 必须实现接口 Doctrine\Persistence\ManagerRegistry,给定 Doctrine\Bundle\DoctrineBundle\Registry 的实例,在 /home/e1759631/public_html/TP1/var/cache/dev/ContainerKm4PF6B/App_KernelDevDebugContainer 中调用。php 第 890 行

知道要做什么吗?

我们可以看看您的存储库吗?

请尝试将此 use 行从

更改为
use Doctrine\Common\Persistence\ManagerRegistry;

use Doctrine\Persistence\ManagerRegistry;

这里有更多信息https://symfony.com/doc/current/doctrine.html#querying-for-objects-the-repository