improved symfony 2.4 compat fix