this is copy-paste from symfony core. but i can change it, would make sense.