diff --git a/src/Persistence/Event/LifecycleEventArgs.php b/src/Persistence/Event/LifecycleEventArgs.php index 72af7cd7..43480226 100644 --- a/src/Persistence/Event/LifecycleEventArgs.php +++ b/src/Persistence/Event/LifecycleEventArgs.php @@ -3,6 +3,7 @@ namespace Doctrine\Persistence\Event; use Doctrine\Common\EventArgs; +use Doctrine\Deprecations\Deprecation; use Doctrine\Persistence\ObjectManager; /** @@ -41,6 +42,13 @@ public function __construct($object, ObjectManager $objectManager) */ public function getEntity() { + Deprecation::trigger( + 'doctrine/persistence', + 'https://github.com/doctrine/common/pull/222', + '%s is deprecated and will be removed in 3.0, use getObject() instead', + __METHOD__ + ); + return $this->object; }