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

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