btw, why moving this code to a protected method ?

- you use it in a single place, so it is not really useful and simply makes it harder to merge fixes between 2.2 and master.
- helper methods should be private by default in Symfony (a protected method is an extension point for which we need to take BC into account)