[WCM] Fix example code to reflect changes for #8226

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | PR symfony/symfony#8528
| Applies to    | 2.2, 2.3
| Fixed tickets | symfony/symfony#8226