Implement compability with Symfony 2.1