Changes for Symfony 2.2 (very instable and not enough tested)