Symfony Class“ App:configsystem”不存在

发布于 2025-02-10 01:28:22 字数 694 浏览 1 评论 0原文

作曲家更新之后,Symfony对我无法正常工作。我已经卸载并重新安装了该项目和作曲家。我能够稍微缩小目前的问题。

在我的项目中,我们目前使用此符号:

$config = $this->getDoctrine()->getRepository("App:ConfigSystem")->find(1);

现在,Symfony抱怨它无法再找到类app:configsystem

一旦将代码更改为以下内容:

$config = $this->em->getRepository(ConfigSystem::class)->find(1)

一切都会正常运行。由于我们仍然在项目中更频繁地使用第一个符号,因此我想问一下您是否知道问题以及如何再次解决问题。不幸的是,我在这个方向上没有发现任何东西。

Composer Update等。不幸的是,没有帮助。

After a composer update, Symfony does not work properly for me. I have uninstalled and reinstalled the project and composer several times. I was able to narrow down my current problem a bit.

In my project we currently use this notation:

$config = $this->getDoctrine()->getRepository("App:ConfigSystem")->find(1);

Now, Symfony complains that it can't find the class App:ConfigSystem anymore.

Error Message Symfony

Once I change the code to the following:

$config = $this->em->getRepository(ConfigSystem::class)->find(1)

everything runs normally again. Since we still use the first notation more often in the project, I wanted to ask you if you know the problem and how to fix it again. Unfortunately, I have found nothing in this direction.

composer update, etc. has unfortunately not helped.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文