[DependencyInjection] fix PhpDumper tests

The build actually only fails on the 2.5 branch, but the changes should
be applied to 2.3 too.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 
| License       | MIT
| Doc PR        |