Use new factory syntax

| Q   | A
| --- | ---
| Doc fix? | no
| New docs? | yes (https://github.com/symfony/symfony/pull/12008)
| Applies to | 2.6+
| Fixed tickets | #4291
although I start to dislike the usage of these roles, I've added it here :)