This is wrong. The ``LifecycleEventArgs`` is a Doctrine event class, not the ``Registry``. So it is not the same method.

In latest ORM versions, ``getEntityManager`` is indeed an alias for the method coming from Doctrine Common, but this method is named ``getObjectManager``, not ``getManager``