Compatibility with symfony 2.3