{"action":"closed","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15643","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15643/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15643/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15643/events","html_url":"https://github.com/symfony/symfony/issues/15643","id":103724157,"number":15643,"title":"Deprecated getEntityManager in LifecycleEventArgs","user":{"login":"toniconca","id":2278912,"avatar_url":"https://avatars.githubusercontent.com/u/2278912?v=3","gravatar_id":"","url":"https://api.github.com/users/toniconca","html_url":"https://github.com/toniconca","followers_url":"https://api.github.com/users/toniconca/followers","following_url":"https://api.github.com/users/toniconca/following{/other_user}","gists_url":"https://api.github.com/users/toniconca/gists{/gist_id}","starred_url":"https://api.github.com/users/toniconca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toniconca/subscriptions","organizations_url":"https://api.github.com/users/toniconca/orgs","repos_url":"https://api.github.com/users/toniconca/repos","events_url":"https://api.github.com/users/toniconca/events{/privacy}","received_events_url":"https://api.github.com/users/toniconca/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-28T14:03:38Z","updated_at":"2015-08-28T14:41:14Z","closed_at":"2015-08-28T14:41:14Z","body":"Hello,\r\nAs far as I know the function getEntityManager is deprecated since Symfony 2.1, but when I'm using a Doctrine event listener I must use getEntityManager instead of getManager.\r\n\r\nWorks this way...\r\n\r\n    public function postUpdate(LifecycleEventArgs $args)\r\n    {\r\n        $entity = $args->getEntity();\r\n        $em = $args->getEntityManager();\r\n        // code...\r\n    } \r\n\r\nI think it should be this....\r\n\r\n    public function postUpdate(LifecycleEventArgs $args)\r\n    {\r\n        $entity = $args->getEntity();\r\n        $em = $args->getManager();\r\n        // code...\r\n    } \r\n"}}