realtebo
7 months ago

Laravel 5.5: "Symfony\Component\HttpFoundation\Request::setTrustedHeaderName()" method is deprecated

Posted 7 months ago by realtebo

In my index.php I have

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);
$response->send();

The row

    $request = Illuminate\Http\Request::capture()

is causing a deprecation warning;

User Deprecated: The "Symfony\Component\HttpFoundation\Request::setTrustedHeaderName()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.

How can I get rid of this?

Thanks in advance

Please sign in or create an account to participate in this conversation.