Compatibility fix for Symfony ^3.4 ^4.0.