3

After executing php bin\console make:entity(User entity) or php bin\console make:migration i get these warnings in console:

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.

Any idea on how to resolve...?

  • You are using something that is deprecated. That means you are using code that isn't being maintained and looks like it will be removed in 2.0. The only suggestion I can give is find a way around using the deprecated class, or don't upgrade to version 2.0 – rhavelka Dec 13 '19 at 16:26
  • Is this a new 5.0 installation or did you upgrade from an earlier version of Symfony? – Cerad Dec 14 '19 at 02:09
  • @Cerad new installation – Diego Walisson Dec 14 '19 at 02:57

1 Answers1

10

This deprecation notice is known.

Doctrine\Common\Persistence\ will be renamed to Doctrine\Persistence without the "Common" part.

But because this is in an external and well maintained dependency you don't have to worry about it too much. it will get fixed. I wouldn't advise you to change it manually because the construct class of the extended "ServiceEntityRepository" is expecting the $registry parameter to be of type '\Doctrine\Common\Persistence\ManagerRegistry'.

I would say... happy developing and keep on going! These deprecation notices will get fixed with a future update. you will have to update your repository classes at some point. just keep an eye on them.

Bulleyes
  • 116
  • 1
  • 4