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

rubenochoa's avatar

composer require fideloper/proxy and class fideloper/Proxy not found

After updating from laravel 9 to 10 I faced many issues but the last one do not want to. The Class "Fideloper\Proxy\TrustProxies" not found.. Tried the command: composer require fideloper/proxy with no results and the terminal shows this:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - fideloper/proxy 1.0.0 requires illuminate/support 4.0.x -> found illuminate/support[v4.0.0, ..., v4.0.10] but these were not loaded, likely because it conflicts with another require.
    - fideloper/proxy[2.0.1, ..., 2.0.2] require illuminate/support ~4 -> found illuminate/support[v4.0.0, ..., v4.2.17] but these were not loaded, likely because it conflicts with another require.
    - fideloper/proxy[2.0.3, ..., 2.1.1] require illuminate/support ~4.0|~5.0 -> found illuminate/support[v4.0.0, ..., v4.2.17, v5.0.0, ..., v5.8.36] but these were not loaded, likely because it con
flicts with another require.
    - fideloper/proxy[3.0.0, ..., 3.3.4, 4.0.0, ..., 4.1.0] require illuminate/contracts ~5.0 -> found illuminate/contracts[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflic
ts with another require.
    - fideloper/proxy 4.2.0 requires illuminate/contracts ~5.0|~6.0 -> found illuminate/contracts[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts
with another require.
    - fideloper/proxy[4.2.1, ..., 4.2.2] require illuminate/contracts ^5.0|^6.0|^7.0 -> found illuminate/contracts[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were n
ot loaded, likely because it conflicts with another require.
    - fideloper/proxy[4.3.0, ..., 4.4.0] require illuminate/contracts ^5.0|^6.0|^7.0|^8.0 -> found illuminate/contracts[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ...
, v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - fideloper/proxy[4.4.1, ..., 4.4.2] require illuminate/contracts ^5.0|^6.0|^7.0|^8.0|^9.0 -> found illuminate/contracts[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0
, ..., v8.83.27, v9.0.0, ..., v9.52.0] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires fideloper/proxy * -> satisfiable by fideloper/proxy[1.0.0, 2.0.1, ..., 2.1.1, 3.0.0, ..., 3.3.4, 4.0.0, ..., 4.4.2].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require fideloper/proxy:*" to figure out if any version is installable, or "composer require fidelope
r/proxy:^2.1" if you know which you need.
0 likes
8 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Find out where you are using it in your code and remove it. Don't install the package

1 like
willyoo's avatar

I hope you can revert to the version 9. It happened to me too everytime I shift my laravel app to the latest version. Just want to shout out to Shift, they give me this : https://caniupgradelaravel.com , to check package.

Remove the package if you are not using it.

1 like
vmartuniyk's avatar

@rubenochoa try read this part in documentation. https://laravel.com/docs/9.x/upgrade#the-assert-deleted-method. I hope it will help you fix your problem

Within your app/Http/Middleware/TrustProxies.php file, update use Fideloper\Proxy\TrustProxies as Middleware to use Illuminate\Http\Middleware\TrustProxies as Middleware.

// Before...
protected $headers = Request::HEADER_X_FORWARDED_ALL;
 
// After...
protected $headers =
    Request::HEADER_X_FORWARDED_FOR |
    Request::HEADER_X_FORWARDED_HOST |
    Request::HEADER_X_FORWARDED_PORT |
    Request::HEADER_X_FORWARDED_PROTO |
    Request::HEADER_X_FORWARDED_AWS_ELB;
composer remove fideloper/proxy
2 likes
maheshharsha's avatar

@rubenochoa remove fideloper/proxy from composer.json and change in app\Http\Middleware.TrustProxies.php use Illuminate\Http\Middleware\TrustProxies as Middleware; instead of Fideloper\Proxy\TrustProxies as Middleware;

3 likes

Please or to participate in this conversation.