執行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 關注
- 114 瀏覽
添加回答
舉報
0/150
提交
取消