Migration from RoutingExtraBundle

It works but I do not like the loop, I'd love to get suggestions.