Issue 4911 fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=issue_4911)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: #4911
Todo: [list of todos pending]
License of the code: MIT
Documentation PR: 

Requires https://github.com/symfony/symfony/pull/4739

I followed @fabpot suggestion: https://github.com/symfony/symfony/pull/4932#issuecomment-7071101