Make it compatible with Symfony 2.3