based on Symfony 2.3