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



执行 php bin\console make:entity(User entity( 或php bin\console make:migration 后,我在控制台中收到以下警告

2019-12-13T15:49:53+00:00 [info] User Deprecated: The DoctrineCommonPersistenceObjectRepository class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use DoctrinePersistenceObjectRepository instead.
2019-12-13T15:49:53+00:00 [info] User Deprecated: The DoctrineCommonPersistenceMappingAbstractClassMetadataFactory class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use DoctrinePersistenceMappingAbstractClassMetadataFactory instead.
2019-12-13T15:49:53+00:00 [info] User Deprecated: The DoctrineCommonPropertyChangedListener class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use DoctrinePersistencePropertyChangedListener instead.
2019-12-13T15:49:53+00:00 [info] User Deprecated: The DoctrineCommonPersistenceMappingRuntimeReflectionService class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use DoctrinePersistenceMappingRuntimeReflectionService instead.
2019-12-13T15:49:53+00:00 [info] User Deprecated: The DoctrineCommonPersistenceEventLoadClassMetadataEventArgs class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use DoctrinePersistenceEventLoadClassMetadataEventArgs instead.
2019-12-13T15:49:53+00:00 [info] User Deprecated: The DoctrineCommonPersistenceMappingStaticReflectionService class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use DoctrinePersistenceMappingStaticReflectionService instead.

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

此弃用通知是已知的。

Doctrine\Common\Persistence\将重命名为Doctrine\Persistence,不带"Common"部分。

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

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

相关内容

  • 没有找到相关文章

最新更新