Complying to newer symfony/doctrine version.