RuntimeException: Failed to start the session because headers have already been sent by "/srv/www/project/vendor/symfony/http-foundation/Response.php" at line 377. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 145 of /srv/www/project/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)
->send()
When returning a Redirect Response, return the response object.
// BAD example.
$response = new RedirectResponse('https://url/path');
$response->send();
// GOOD example.
return new RedirectResponse('https://url/path');