Add generator interface and fix test Symfony 2.3

Please add new tag, thanks.