Add generator interface and fix test Symfony 2.3