Windows上Symfony 5.0.1控制台中不推荐使用的类警告

问题描述 投票:0回答:1

执行php bin \ console make: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.

关于解决方法的任何想法...?

php symfony doctrine-orm doctrine
1个回答
0
投票

此弃用通知是已知的。

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

但是由于这是在外部且维护良好的依赖项中,因此您不必担心太多。它会固定的。我不建议您手动更改它,因为扩展的“ ServiceEntityRepository”的构造类期望$ registry参数的类型为'\ Doctrine \ Common \ Persistence \ ManagerRegistry'。

我会说...很高兴发展,并继续前进!这些弃用通知将在以后的更新中修复。您将必须在某个时候更新存储库类。只是关注他们。

© www.soinside.com 2019 - 2024. All rights reserved.