getEntityManager() is deprecated since Symfony 2.1.

see https://github.com/doctrine/DoctrineBundle/blob/master/Registry.php#L71
Merge pull request #67 from bangpound/fix-deprecation-notices

getEntityManager() is deprecated since Symfony 2.1.