为了账号安全,请及时绑定邮箱和手机立即绑定

Windows 上 Symfony 5.0.1 控制台中已弃用的类警告

Windows 上 Symfony 5.0.1 控制台中已弃用的类警告

PHP
斯蒂芬大帝 2022-06-17 14:49:27
执行php bin\console make:entity (User entity) 或php bin\console make:migration后,我在控制台中收到以下警告:2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\ObjectRepository class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\ObjectRepository instead.2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\Mapping\AbstractClassMetadataFactory instead.2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\PropertyChangedListener class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\PropertyChangedListener instead.2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\Mapping\RuntimeReflectionService class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\Mapping\RuntimeReflectionService instead.2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\Event\LoadClassMetadataEventArgs instead.2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\Mapping\StaticReflectionService class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\Mapping\StaticReflectionService instead.关于如何解决的任何想法...?
查看完整描述

1 回答

?
尚方宝剑之说

TA贡献1788条经验 获得超4个赞

此弃用通知是已知的。

Doctrine\Common\Persistence\ 将被重命名为 Doctrine\Persistence 而没有“Common”部分。

但是因为这是一个外部且维护良好的依赖项,所以您不必担心太多。它会得到修复。我不建议您手动更改它,因为扩展的“ServiceEntityRepository”的构造类期望 $registry 参数的类型为“\Doctrine\Common\Persistence\ManagerRegistry”。

我会说......快乐的发展并继续前进!这些弃用通知将在未来的更新中得到修复。您将不得不在某个时候更新您的存储库类。只要留意他们。


查看完整回答
反对 回复 2022-06-17
  • 1 回答
  • 0 关注
  • 98 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信