remove deprecated in 2.2

- getEntityManager is deprecated since Symfony 2.1. Use getManager instead 
- setFlash() is deprecated since version 2.1 and will be removed in 2.3. Use the FlashBag instead