I am trying to upgrade my Laravel 5.5
to 5.6.
I have followed the instructions from the laravel website, yet I got this error:
Your
To anyone who tried upgrading directly from laravel 5.5 to 5.7, and got this problem too, remove the trustedproxy.php file from app->config->trustedproxy.php
.
Hopes that helps someone.
I did the following things and got my project to run on Laravel 5.6-dev:
"minimum-stability":
"dev", "prefer-stable": true
at the end of my composer.json file.First install Laravel 5.6 i faced this error as well. Just follow the few steps below will fix it:
composer.json
requirement has:"require": { "php": "^7.1.3", "fideloper/proxy": "^4.0", },
composer update
to make sure your composer is up-to-datecomposer require fideloper/proxy:~4.0
Had the same issue in Laravel 5.7. You may add TELESCOPE_ENABLED=false
in your .env
or .env.dusk.local
:Source
Your problem comes from your use of the library TrustedProxy.
It uses Symfony's HEADER_CLIENT_IP
constant which was deprecated with Symfony 3.3 and completely removed in Symfony 4.0.
Since Laravel 5.6 has updated to use Symfony 4 components, this will no longer work.
The way to solve it is to do what patricus suggested and use Laravel's TrustProxies middleware.
Faced the same issue and got a number of guidelines to resolve this. Unfortunately none of those worked or me. Actually there is no additional step or tasks needed to be addressed to fix this issue.
Just follow the official upgrade guide from https://laravel.com/docs/5.6/upgrade and along with that remove the trustedproxy
config file located at config/trustedproxy.php