Updated for Symfony 2.4.x