Disable deprecated errors for symfony 2.7 and higher