Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Mikejs's avatar

Upgrade from v9 to v10 error with \App\Http\Middleware\TrustProxies::class,

Hi a bit of an odd one, if I create a new Laravel app v10 I can see \App\Http\Middleware\TrustProxies::class, despite fideloper/proxy not being in the composer file.

When I try to upgrade an app from 9 to 10 if I remove fideloper/proxy from my composer file I get class TrustProxies not found so the app doesn't load?

How is the middleware working in a fresh install but not when upgrading, I followed this upgrade guide https://blog.devgenius.io/how-to-upgrade-from-laravel-9-x-to-laravel-10-x-926b826b454f

0 likes
2 replies
jlrdw's avatar

I suggest following the laravel upgrade guide from the documentation.

1 like
mike_isp's avatar

Laravel 9.0 integrated it directly so you don't need the package. If your app has evolved from one on Laravel 8.0 or below you might need to see the Trusted Proxies section of the Laravel 9.0 upgrade docs.

Please or to participate in this conversation.