Use new factory syntax
Applied fixes
feature #4498 Use new factory syntax (WouterJ)

This PR was merged into the 2.6 branch.

Discussion
----------

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

Commits
-------

9cbcc2b Applied fixes
d7998b0 Use new factory syntax