执行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”。
我会说......快乐的发展并继续前进!这些弃用通知将在未来的更新中得到修复。您将不得不在某个时候更新您的存储库类。只要留意他们。
- 1 回答
- 0 关注
- 98 浏览
添加回答
举报
0/150
提交
取消