I added this exception based on what @stof said at https://github.com/symfony/symfony/issues/9564#issuecomment-29152040