Reverted last commit to preserve compatibility with Symfony 2.2